very simple regex won't work for me
Posted: Mon Jul 02, 2007 6:15 am
I'm trying to get the folloinwg reg ex to return a string two parts :
this string would be :
Ideally it should return either side of the = in the string as two seperate strings, product_url and name
However the above regex just doesn't seem to return the second part, instead it returns :
And I just can't figure out why, anyone able to help?
Thanks
this string would be :
Code: Select all
$string = product_url=name
preg_match_all("#(product_url)=(.*?)#i", $string, $arr_Temp);However the above regex just doesn't seem to return the second part, instead it returns :
Code: Select all
Array
(
[0] => Array
(
[0] => product_url=
)
[1] => Array
(
[0] => product_url
)
[2] => Array
(
[0] =>
)
)And I just can't figure out why, anyone able to help?
Thanks