|
Posted by Alvaro G. Vicario on 08/22/06 21:25
*** mark babli escribió/wrote (Tue, 22 Aug 2006 19:06:57 GMT):
>> $string = '( ="test"; )';
>> preg_match("/\( =\"(\w+)\"; \)/", $string, $m);
>> print $m[1];
>> ?>
>>
>> Output: test
>>
>> --
>> Sandman[.net]
>
> Actually, I need what is between the " ". Thanks
Then it should be even easier:
preg_match('/"(.*)"/U', $string, $m); // Not tested
--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--
Navigation:
[Reply to this message]
|