If you would like to know what's wrong with your regex, here's an explanation:
/^(http|https|://)youtube.com|vimeo.com.*$/
First thing's first: You need to encapsulate the youtube|vimeo part as a group (we'll add ?: to the front since we don't want to capture it). otherwise it's actually looking for (^(http|https|://)youtube.com)|(vimeo.com) which is not what you intend at all. Also, you'll want to escape your periods, since that is the dotall character (I'm assuming you do not want "youtubescom" to match), as well as your forward slashes.
Now, we have:
/^(http|https|:\/\/)(?:youtube\.com|vimeo\.com).*$/
So, here we're checking to see if "http", "https" or "://" starts a string and comes before either "youtube.com" or "vimeo.com". But, what we really want is to check if "http://", "https://" or just "//" comes before either:
/^(http:\/\/|https:\/\/|\/\/)(?:youtube\.com|vimeo\.com).*$/
You can stop there, that's your answer. However, let's continue with some cleanup by finding the redundancies. First, both our domains both have ".com", so we can make that part simply (?:youtube|vimeo)\.com. Next, our protocol prefixes all have "//", so we can pull that out to : (http:|https:)\/\/. However, now "http:" or "https:" must start the string. Since we want those to be optional, we'll add a "?" afterwards, so we get (http:|https:)?\/\/. Now, since those are so close, all we really want is that optional "s" for ssl. Finally, we can finally get:
/^(https?:)?\/\/(?:youtube|vimeo)\.com.*$/
/^(https?:)?\/\/...