Python : Small Regex problem
Posted
by user316758
on Stack Overflow
See other posts from Stack Overflow
or by user316758
Published on 2010-04-14T17:29:05Z
Indexed on
2010/04/14
17:33 UTC
Read the original article
Hit count: 322
Hi, when I try to extract this video ID (AIiMa2Fe-ZQ) with a regex expression, I can't get the dash an all the letters after.
Someone can help me please?
Thanks
>>> id = re.search('(?<=\?v\=)\w+', 'http://www.youtube.com/watch?v=AIiMa2Fe-ZQ')
>>> print id.group(0)
>>> AIiMa2Fe
© Stack Overflow or respective owner