I have this HTML:
"This is simple html <a href='google.com'>text</a><span class='simple'>simple simple text text</span> text"
I need to match only words that are outside HTML tag. I mean if I want to match “simple” and “text” I should get the results only from inside of HTML tags except for tag.
I was close with this regexp (text|simple)(?![^<]*>|[^<>]*<\/)
but I am excluding all the html tags.
答案 0 :(得分:0)
我想我已经解决了
stream_context_create