Re: Removing every thing between ( )

From: Date: Wed, 20 Feb 2002 22:29:59 +0000
Subject: Re: Removing every thing between ( )
Groups: php.general 
Request: Send a blank email to php-general+get-85621@lists.php.net to get a copy of this message
what do you have so far ? at least you need to 'replace', and I recommend perl style preg_replace() which is very powerfull. then you need an expressions that matches the '(001 Test)' part, how to do this can be found in the manual, however here's a small tip: /[0-9]+/ matches a series of one or more numbers bvr. On Wed, 20 Feb 2002 14:24:33 -0800, Brian Paulson wrote: >Hello, > > What would the regular expression be to remove all the text >between ( ) > >$string = "This is a (001 Test) and (002 Test)"; > >The numbers always change but the word stays the same > >Any help would be appreciated. > > >Thank You >Brian Paulson >Sr. Web Developer >bpaulson@chieftain.com >http://www.chieftain.com > > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#85621) next »