I couldn't get your suggestion working, but I was able to get it working by adding a negative lookahead to the end: (?![^<]*?>)
e.g.: (?<=[\s>"“\'‘])_(?P<words>[^_]+)_(?![^<]*?>)
My concern is I know John worked through many regex variations of these patterns trying to quash problems like this, not sure if this one will introduce some other unforeseen issue. This may have already been tried.
I couldn't get your suggestion working, but I was able to get it working by adding a negative lookahead to the end:
(?![^<]*?>)
e.g.: "“\'‘]) _(?P<words> [^_]+)_ (?![^<] *?>)
(?<=[\s>
My concern is I know John worked through many regex variations of these patterns trying to quash problems like this, not sure if this one will introduce some other unforeseen issue. This may have already been tried.