Re: reg. expressions
| From: | Afan Pasalic | Date: | Wed, 13 Oct 2004 14:16:08 +0000 |
| Subject: | Re: reg. expressions | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-199375@lists.php.net to get a copy of this message | ||
That was fast! :)
Thanks Matt
-afan
Matt M. wrote:
on one place I have string "something (something_2)" I have to take out of the string everything in brackets and brackets as well. probably I will need to use Regular Expression Functions but I'm really bad with them :)$string = "something (something_2)"; $pattern = "/\(.*\)/"; $replacement = ""; echo preg_replace($pattern, $replacement, $string); .