Re: regex help

From: Date: Tue, 01 Aug 2000 12:08:15 +0000
Subject: Re: regex help
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-9419@lists.php.net to get a copy of this message
Hi kev! On Tue, 01 Aug 2000, kev wrote: > Hi, > > This should be incredibly easy, but I can't get it to work - I'm trying > to extract terms from a string, the terms being enclosed in quotes, eg > '"michael owen" "gerrard houllier"'. So why doesn't the > following code > find any matches? > > $query = "\"michael owen\" \"gerrard houllier\""; > $nmatches = preg_match_all( "/(\\\".*\\\")/", $query, $matches ); preg_match_all ('/"[^"]+"/',$query, $matches); -- teodor

« previous php.general (#9419) next »