If I have two iframes, how can I match the one that HAS NOT a youtube src ?
<iframe src="http://googleads.g.doubleclick.net/pagead/ads?client=ca-feed-pub"></iframe>
<iframe src="http://www.youtube.com/embed/Y4MnpzG5Sqc?wmode=opaque"></iframe>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You have all your data in a single string, that may contain several tags? In that case you’ll need to 1) find each separate iframe in string, 2) check each found iframe if you need to remove it or leave it alone. Here’s the code that does just that with comments showing where each step is performed: