Re: Regex Mixtake

From: Date: Sat, 03 Feb 2007 18:58:50 +0000
Subject: Re: Regex Mixtake
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-248248@lists.php.net to get a copy of this message
2007/2/3, Steffen Ebermann <eseh@nognu.de>:
You have to use preg_match_all() if (preg_match_all("!\"(.+)\"!sU", $var, $match))
oh wow! works very well... but... i take 2 days reading about ereg ='( there is no way to do this using ereg an not preg (PCRE)... anyway, PCRE is better that ereg?
On Sat, Feb 03, 2007 at 12:36:59PM -0500, Manolet Gmail wrote: Hi, i have a problem using regex, i want to get all the text between " " so i try this... $subject = 'menu "Archer?",-,"Chief?",L_Menu2,"Big Mouth?",L_Menu3;'; if (ereg('"([^"]*)"', $subject, $regs)) {
      print_r($regs);
}


« previous php.general (#248248) next »