From: "Chris Hayes" <[EMAIL PROTECTED]>

> >I would like to extract the quoted text from a string
> >for example : the translation for beautiful is "beau" and wonderful is 
> >"formidable"
> >I need to get 'beau' and 'formidable' strings into an array.
> >
> >Any idea??
> >I can go with strpos and substrings, but maybe there is something more 
> >convenient?
> 
> I can imagine preg_match() with search pattern "/\"[[:alnum:]]*\"/Ui"
> 
> See http://www.php.net/preg_match. You may need print_r to see where the 
> desired result is in the array of matches.

Use preg_match_all(), otherwise you'll only get the first match.

---John Holmes...

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

Reply via email to