php - extract url using preg match -


i need in preg_match. need data starting after ?q= , ends before &ct

e.g

i/p -

http://www.google.com/url?q=http://www.sfgate.com/travel/article/vermont-s-shelburne-museum-opens-pizzagalli-center-4735584.php&ct=ga&cd=nzizotq3mjk1ntg1ntg4nje2oq&cad=cae=yaa&usg=afqjcnhx6ccemalghgzway7uvxzozul7qw

o/p -

http://www.sfgate.com/travel/article/vermont-s-shelburne-museum-opens-pizzagalli-center-4735584.php

i dont have experience of preg_match please help.it great me.

thanks in advance!!!

parse_url , parse_str better regexp in case.


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -