<?php $content = 'Some text that contains src <iframe src="www.example.com"/> Some text'; echo preg_replace('~<iframe[^>]*\K (?=src=)~i', ' data-', $content);
You have javascript disabled. You will not be able to edit any code.