问题
I need the regex pattern where it finds the text other than the html tags,
(<\s*[^>]*>)
And the text is
This is simple html text <span class='simple'>simple simple text text</span> text
Result should be
This is simple html text simple simple text text text
Please check the below link
https://regex101.com/r/cD8nG4/217
回答1:
In the example you gave, it is much easier to find the HTML tags with the regex you already have, and then replace the found strings with empty strings.
I have done that several times, and it works like a charm.
来源:https://stackoverflow.com/questions/56930710/need-regex-to-select-the-negative-pattern-selection-of-html-tags