Solved

Find all text within parenthesis

Posted on 2007-11-30
3
578 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

734 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