I'm using the following regex to capture the entire src attribute using preg_match_all:
<iframe.*src=\"(.*)\".*><\/iframe>
I'm now looking for a way to capture the src attribute (including parameters) only if the url contains either youtube or vimeo. My attempt failed miserably:
<iframe.*src=.*(?:youtube|vimeo).*>\/iframe>
Any suggestions would be greatly appreciated.
many thanks,
devin