I have this regex:
/.*v\=([\w-]+).*(&autoplay\=1)?/
Which I am trying to match against:
http://www.youtube.com/watch?v=awmLS6GCJno&width=1000&height=300&autoplay=1
This does not work. (It matches the v=.. but not the autoplay=1)
However, if I change my regex to:
/.*v\=([\w-]+).*(&autoplay\=1)/
(no ? after autoplay), then it does match both.. (but now a URL without &autoplay won't get matched any more).. which is why I added the ? after that group.. Is that wrong? Is there another way?
Oops about that autofill title, obviously not the issue.