I want to extract a value from the url for example the url is
http://www.youtube.com/watch?v=N22qGmYIUVU&feature=g-logo
i would need to have the value of v from the url using php. I understand it needs to be done using regex, but me not so good at it, I have checked the other related questions but i found issues with the way they resolved.
for ex this regex – /http\://www.youtube.com/watch\?v=([\w-]{11})/
restricts the value of v to 11 i do not want that, basically if it encounters a “#” or a “&” or any delimiter the value of v should be terminated and extracted.
the value of v could be of any length
Please help!
Here’s a more fool proof way than using regex.