Linked Questions

1 vote
2 answers
145 views

Example: This is a text [Java [Script]] [Programming] Expected output: group 1: Java [Script] group 2: Programming What I tried: \[([^\[\]]*?)\] which gives me two groups but the groups are: group ...
Raz's user avatar
  • 29
-1 votes
1 answer
164 views

I was not sure how to phrase the title of this question, but imagine i have the following string: (1,2),(3,(4)) I want a regex that allows me to get 1,2 and 3,(4) The regex I currently have is \\(([^)]...
davidbaguetta's user avatar
0 votes
0 answers
109 views

I read the question and answer and this is not a duplicate. I would like to find all comma and split the string by them which are outside of all parenthesis. Consider the following string abc(def(100,...
Some Name's user avatar
  • 9,740
0 votes
1 answer
78 views

I am trying to write a regex for delimiters “(“, “)”, “,”. I tried to write a regex but it is not the correct for the delimeters. Let's say the input is mult(3,add(2,subs(4,3))). The output with my ...
Diana J's user avatar
  • 53
2356 votes
36 answers
4.0m views

I need to match all of these opening tags: <p> <a href="foo"> But not self-closing tags: <br /> <hr class="foo" /> I came up with this and wanted to make ...
454 votes
23 answers
534k views

I need a regular expression to select all the text between two outer brackets. Example: START_TEXT(text here(possible text)text(possible text(more text)))END_TXT ^ ...
DaveF's user avatar
  • 6,929
52 votes
1 answer
221k views

What is this? This is a collection of common Q&A. This is also a Community Wiki, so everyone is invited to participate in maintaining it. Why is this? regex is suffering from give me ze code type ...
59 votes
7 answers
4k views

Note: This is a question about possibilities of modern regex flavors. It's not about the best way to solve this using other methods. It's inspired by an earlier question, but that one is not ...
Qtax's user avatar
  • 34k
17 votes
2 answers
24k views

I would like to match a string within parentheses like: (i, j, k(1)) ^^^^^^^^^^^^ The string can contain closed parentheses too. How to match it with regular expression in Java without writing a ...
Li Dong's user avatar
  • 1,108
11 votes
4 answers
1k views

I have a String that contains 2 or 3 company names each enclosed in parentheses. Each company name can also contains words in parentheses. I need to separate them using regular expressions but didn't ...
Eqr444's user avatar
  • 113
1 vote
3 answers
2k views

I need to parse a comma separated text file where a line can contain a json as column value. The file also contains a header row. I am trying to build a regular expression, so that I can parse the ...
adbdkb's user avatar
  • 2,259
0 votes
1 answer
591 views

I need a regular expression for a Java syntax parser that matches my programming language syntax that look like this: Variable1={1,2,3} Variable2=Variable1+{4,5,6}+{}*{2} Variable3=(Variable2+{1})*...
user1095332's user avatar
2 votes
2 answers
206 views

In an extended regular expression, with backrefernces, is it valid to have a backreference before the associated group? For example, does the pattern \1(a) make sense and what does it match?
BeeOnRope's user avatar
  • 66.3k
2 votes
1 answer
246 views

Hi I'm trying to create a Regex to help separate a string into a series of object fields, however having issues where the individual field values themselves are lists and therefore comma separated ...
Will's user avatar
  • 41
0 votes
1 answer
163 views

Consider the following java String: String input = "a, b, (c, d), e, f, (g, (h, i))"; Can you help me to find a java regexp to obtain its 6 parts: a b (c,d) e f (g, (h,i)) That were obtained from ...
Goose's user avatar
  • 371

15 30 50 per page