How to validate a youtube playlist url using regex?
I've found the answer for validating video from other question..
/^http:\/\/(?:www\.)?youtube.com\/watch\?(?=.*v=\w+)(?:\S+)?$/
But I've just unable to validate a url like this :
http://www.youtube.com/watch?list=PL1F9CA2A03CF286C2&v=pFS4zYWxzNA&
or
http://www.youtube.com/watch?v=pFS4zYWxzNA&list=PL1F9CA2A03CF286C2&
try this
Edit: i improved the matching
I ended up with a something similar but different:
worked against the following urls:
Given the follow code:
My return is PLBOh8f9FoHHjOz0vGrD20WcTtJar-LOrw