Comment 7 for bug 986298

Revision history for this message
Lee (ldolse) wrote :

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.