I want to write a regex to ignore iframes containing urls from youtube, vimeo or soundcloud in a string encoded with HTML entities.
This is what i tried and is not working. Some sample texts are given below
REGEX
<iframe(^?youtube|soundcloud|vimeo)*\/iframe
SAMPLE TEXT
<p><iframe src="http://www.3you3tube.com/embed/YoX1yc92MOU" width="500" height="300" frameborder="0" scrolling="auto"></iframe></p>
29 <p>text daily to place domain staff as volunteers with charity partners, we know all too well that the "V" word can sometimes be misunderstood. Occasionally seen as a dusty, worthy word, it can conjure images of coffee mornings and bric-a-brac stalls. So its not always as easy as you might think to get people to embrace their inner-volunteer. That's why the <a href="http://www.domain.co.uk/sdfn/2010/11/connect-create-domain-volunteers.shtml">Conne
SAMPLE OUTPUT
<iframe src="http://www.3you3tube.com/embed/YoX1yc92MOU" width="500" height="300" frameborder="0" scrolling="auto"></iframe>
SAMPLE TEXT
<p><iframe src="http://www.youtube.com/embed/YoX1yc92MOU" width="500" height="300" frameborder="0" scrolling="auto"></iframe></p>
29 <p>text daily to place domain staff as volunteers with charity partners, we know all too well that the "V" word can sometimes be misunderstood. Occasionally seen as a dusty, worthy word, it can conjure images of coffee mornings and bric-a-brac stalls. So its not always as easy as you might think to get people to embrace their inner-volunteer. That's why the <a href="http://www.domain.co.uk/sdfn/2010/11/connect-create-domain-volunteers.shtml">Conne
SAMPLE OUTPUT
nil
Just to be clear:
i want to ignore iframes which have youtube, vimeo or soundcloud in them.
and i am testing it on rubular http://rubular.com/r/F9x6SSkIfu