I think this deserves a comment to explain that the regex is matching against everything except html tags.  I had to stare at the `(?=[^>]*<)` for a while to figure out thats what it was doing.