Solved

Find all text within parenthesis

Posted on 2007-11-30
3
574 Views
Last Modified: 2012-06-22
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
Comment
Question by:dkloeck
  • 2
3 Comments
 
LVL 27

Accepted Solution

by:
ddrudik earned 500 total points
ID: 20383128
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
 
LVL 10

Author Comment

by:dkloeck
ID: 20383344
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
 
LVL 27

Expert Comment

by:ddrudik
ID: 20444057
Thanks for the question and the points.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Export Table to CSV - Access to CSV - using python 18 100
creating threads in delphi 1 82
Path to Python 9 107
how to use laptop or pad camera in vb.net windows application 2 54
A short article about a problem I had getting the GPS LocationListener working.
This is an explanation of a simple data model to help parse a JSON feed
This video teaches viewers about errors in exception handling.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now