Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 583
  • Last Modified:

Find all text within parenthesis

Hi there!,

I want a RegEx to find all text in a opened and closed parenthesis.

note that there may be other parenthesis inside that one.
For example this should match ((int)GetInt((float)3))
however, it should not match with unfinished parenthesis such as ((int) or ((int)GetInt((float)

Thanks in advance,
DK
0
dkloeck
Asked:
dkloeck
  • 2
1 Solution
 
ddrudikCommented:
You didn't mention what OS/lang, but here's a couple links that might help:

.NET:
http://www.codeproject.com/csharp/RegEx_Balanced_Grouping.asp
Perl:
http://math2.org/david/text-balanced/pod.html
0
 
dkloeckAuthor Commented:
I need it for use with the Visual studio .net 2005 search with RegEx (WinXP Prof.)
I will use it to search within code
0
 
ddrudikCommented:
Thanks for the question and the points.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now