views:

48

answers:

3

I wish to match

&v=

and before

">

is there a regex match i could use

Example:

<a accesskey="1" href="/watch?gl=GB&amp;client=mv-google&amp;hl=en-GB&amp;v=ubNF9QNEQLA">Test Your Awareness : Whodunnit?</a>

i only need the ubNF9QNEQLA

Thanks

A: 
 /&v=(.*?)">/

The question mark tells the wild char matching to be lazy so it will stop at the first "> rather than at the last one.

Motti
Trying now :). Cross Fingers
Dosent work :/, i just recieve )
@user, can you post a sample string?
Motti
@user and did you modify the regex accordingly?
Motti
Yes i believe so, also i posted an example at the top in an edit
+1  A: 
/&amp;v=([^(">)]+)/
Alan Haggai Alavi
Sorry not working :/. i dont understand wy
Still not working after that modification
I have no idea why it does not work for you. It works for me, though.
Alan Haggai Alavi
A: 
/&amp;v=(.*)>/

This solved it