Re: REGEX query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx

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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux