Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 4
    what the ... 1. Whats your input (examples), 2. What do you want to fetch 3. What RegEx have you tied that didint work? Commented Oct 27, 2010 at 8:11
  • please clarify -- anything between what? where in that string of brackets do you want to find the anything? Commented Oct 27, 2010 at 8:11
  • i have a condition which will hold true if it matches () or (()) or ((())) or ()()() or (()()()).The brackets can be of any number. If the condition does not match i want to go in the false part.The input can be any of the examples mentioned above and some wrong input will be (() or (()()( or (())) etc Commented Oct 27, 2010 at 8:19
  • no only )( is not a valid string Commented Oct 27, 2010 at 9:53
  • why is (() invalid? It matchies "anything between ()" (in this case, the "anything" is "(") Commented Nov 1, 2010 at 15:04