Re: [PHP] Regex Mixtake

2007-02-04 Thread Richard Lynch
On Sat, February 3, 2007 12:58 pm, Manolet Gmail wrote: > anyway, PCRE is better that ereg? Yes! Faster, easier, more flexible, and better documented. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch

Re: [PHP] Regex Mixtake

2007-02-03 Thread Robert Cummings
On Sat, 2007-02-03 at 13:58 -0500, Manolet Gmail wrote: > 2007/2/3, Steffen Ebermann <[EMAIL PROTECTED]>: > > 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

Re: [PHP] Regex Mixtake

2007-02-03 Thread Steffen Ebermann
Side note: $exp = explode('"', $var); foreach ($exp as $key => $val) if ($key%2!=0) $arr[] = $val; var_dump($arr); works without regular expressions. -- Steffen 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 b

Re: [PHP] Regex Mixtake

2007-02-03 Thread Manolet Gmail
well thanks you too much, i will learn the preg sintax. 2007/2/3, Steffen Ebermann <[EMAIL PROTECTED]>: I don't know, but http://php.net/manual/en/function.ereg.php says "Note: preg_match(), which uses a Perl-compatible regular expression syntax, is often a faster alternative to ereg

Re: [PHP] Regex Mixtake

2007-02-03 Thread Steffen Ebermann
I don't know, but http://php.net/manual/en/function.ereg.php says "Note: preg_match(), which uses a Perl-compatible regular expression syntax, is often a faster alternative to ereg()." On Sat, Feb 03, 2007 at 01:58:50PM -0500, Manolet Gmail wrote: > anyway, PCRE is better that ereg?

Re: [PHP] Regex Mixtake

2007-02-03 Thread Manolet Gmail
2007/2/3, Steffen Ebermann <[EMAIL PROTECTED]>: 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

Re: [PHP] Regex Mixtake

2007-02-03 Thread Steffen Ebermann
You have to use preg_match_all() if (preg_match_all("!\"(.+)\"!sU", $var, $match)) 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,

[PHP] Regex Mixtake

2007-02-03 Thread Manolet Gmail
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); } but just return me: Array ( [0] => "Archer?" [1] => Archer?