regex help

From: Date: Tue, 01 Aug 2000 12:24:30 +0000
Subject: regex help
Groups: php.general 
Request: Send a blank email to php-general+get-9404@lists.php.net to get a copy of this message
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 ); echo "\$nmatches = ".$nmatches."<BR>"; thanks, - Kev

« previous php.general (#9404) next »