Great,

        Thanks for the help, worked like a charm

Brian

-----Original Message-----
From: CC Zona [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 20, 2002 1:50 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Removing every thing between ( )


In article <001901c1ba5d$634e3840$89010a0a@bpaulson>,
 [EMAIL PROTECTED] (Brian Paulson) wrote:

>       What would the regular expression be to remove all the text
between  
> (  )
> 
> $string = "This is a (001 Test) and (002 Test)";

$string=preg_replace("/\(.+\)/U",'',$string);

Note that leading/trailing spaces are left in, and the parens are
dropped, 
so you may want to adjust it a bit.

-- 
CC

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to