Re: Regex Mixtake

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 between " "
> 
> so i try this...
> 
> $subject = 'menu "Archer?",-,"Chief?",L_Menu2,"Big Mouth?",L_Menu3;';
> if (ereg('"([^"]*)"', $subject, $regs)) {
> 	print_r($regs);
> }

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux