As without parsing, only using regular expressions, to get from a set of identical tags, tags with specific content
XML:
<tag> ... </tag> <tag> ... content ... </tag> <tag> ... content ... </tag>
Result:
<tag> ... content ... </tag> <tag> ... content ... </tag>
naive solution doesn't work:
.*?<tag>.*?content.*?<\/tag>
an idea with a negative lookahead didn't work either:
.*?<tag>.*?(?!<\/tag>).*?content.*?<\/tag>
Interested in: Is it possible to implement this on regex? if not, why?
debugger example: https://regex101.com/r/ULZVO5/6
similar task with single brackets place tag:
(...)(..)(...ABC...)(..)(.,.ABC,.)
decision:
\([^)]*ABC[^)]*\)
reference to debugger: https://regex101.com/r/MyWevz/1/