Re: REGEX query
| From: | Kim Christensen | Date: | Wed, 08 Feb 2006 19:06:20 +0000 |
| Subject: | Re: REGEX query | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-230119@lists.php.net to get a copy of this message | ||
Alexis,
> Unfortunately, for what I'm trying to do, it is of little use. I
> probably should have mentioned that the bit of text I used is actually
> just part of a much bigger bit of text so exploding on a space would
> cause havoc with the rest of it. Hence the REGEX question.
$text = '(\(EX\) RV-6 )';
preg_match_all("/\([^\)]+\) ([^\)]+) \)/", $text, $result);
echo $result[1][0];
Take care
--
Kim Christensen
kim.christensen@gmail.com