Is it possible to select an HTML tag (not-specified) and its contents, depending on whether or not there is a specific string inside it?
e.g.:
<tagouter>
<tag> lorem ipsum youtube lorem ipsum</tag>
outer text
<tag> lorem ipsum youtube lorem ipsum TEXT 2</tag>
<tagouter>
Expected result:
array(array('youtube','<tag> lorem ipsum youtube lorem ipsum</tag>'),array('youtube',<tag> lorem ipsum youtube lorem ipsum TEXT 2</tag>))
With /(\byoutube\b)/
it will be possible to get the string itself.
But how to get the containing tags content?