26
rated 0 times
[
33]
[
7]
/ answers: 1 / hits: 58618
/ 11 Years ago, thu, october 24, 2013, 12:00:00
I have a regex pattern that I'm using (got it from Stack Overflow) to extract a video ID from a vimeo URL:
var regExp = /http://(www.)?vimeo.com/(d+)($|/)/;
var match = url.match(regExp);
I need it to work whether http or https is specified. I've tried
var regExp = /http(s)?://(www.)?vimeo.com/(d+)($|/)/;
But this fails on both http and https.
Help a brother out.
More From » regex