Solved

Find all text within parenthesis

Posted on 2007-11-30
3
577 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

Question has a verified solution.

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

Suggested Solutions

This article will show, step by step, how to integrate R code into a R Sweave document
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

830 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