Forum Moderators: coopster
I'm trying to pick a value from a url.
url example 1
http://www.example.com/index.php?id=2123123
example 2
http://www.example.com/index.php?id=2123123&a=asdad
regular expression
preg_match("/id=(.*?)&¦\Z/",trim($url),$match);
this regular expression seems to work for the 2nd url but not for the first. if i replace the ¦ sign with? or just take the & sign out all togather then it works for the first URL.
Any help guys?
Thanks
[edited by: dreamcatcher at 3:09 pm (utc) on Aug. 22, 2007]
[edit reason] Use example.com, thanks. [/edit]