Extract parameter value from url using regular expressions

Posted by Oscar Reyes on Stack Overflow See other posts from Stack Overflow or by Oscar Reyes
Published on 2009-08-14T22:46:03Z Indexed on 2010/04/09 7:13 UTC
Read the original article Hit count: 566

Filed under:
|
|

This should be very simple ( when you know the answer ). From this question

I want to give it a try to the posted solution. And my question is:

How to get the parameter value of a given url using javascript regexp?

I have:

 http://www.youtube.com/watch?v=Ahg6qcgoay4

I need:

 Ahg6qcgoay4

I tried:

http://www.youtube.com/watch\\?v=(w{11})

But: I suck...

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about regex