View Full Version : [PHP] preg_replace : clean up a URL ising a regular expression

April 30th, 2008, 08:37 AM
hello there,
i'm no programmer, but i happen to code php as a hobby. i have basic skills and lately i've been playing with regexp. however i'm a bit stuck when it comes to slightly difficult regexp.

i need to parse a URL that may look like (for instance)


i'd like to extract the url argument that's between "&url=" and "&id" but i can't figure out how to do it in a simple way.

i guess one of you might know of a way that's straightforward enough, so i thought i'd ask.

thanks in advance.

April 30th, 2008, 10:15 AM
ok, in fact my problem came from "&" actually being "&"
i guess i'm not to bad in regex, then.