I would like to wrap (surround) all words "flyer" (case insensitive) in the HTML text content, not those in the link. My RegEx works fine on Regex101 ...

... but not with this JS replacement:

str.replace("(?<=>[^<]*)(flyer)|(flyer)(?=[^>]*<)","<u>$1$2</u>"

Expected result (like Regex101). 5 words "flyer" in HTML text are wraped by U tag: <u> </u>

How to fix my JS RegEx ?