For the purposes of a larger script I'm working on, I need to match all text that does not fall between certain HTML tags. I'd like to be able to set a variable equal to these excluded tags, i.e.
Code: Select all
$excluded_tags = '(pre|blockquote)'My problem is that I can't seem to figure out how to use regex to say "Match everything except what falls between these tags".
Any ideas? Thanks in advance.