Page 1 of 1

Removing parentheses with data between them

Posted: Sat Sep 08, 2007 11:15 pm
by tecktalkcm0391
How can I get a regular expression (i am soooo not good with them :oops:) so that I can remove anything in parentheses..

So here is a string (that I only want first half would now be)
So here is a string

Posted: Sun Sep 09, 2007 6:32 am
by superdezign
That's pretty simple.

Code: Select all

\([^\)]*\)

Code: Select all

\(.*?\)

Posted: Sun Sep 09, 2007 10:23 am
by John Cartwright
FYI, you'll be using preg_replace() for those patterns.