I have condition where I have to select anything which is not part of span tag.
Input -
the <span class='ptc-highlightedSearchResult'>PISTON</span> has their <span class='ptc-highlightedSearchResult'>ROD</span> ring
regex which selects <span>
tag and it's content -
(<span[^>]+class\s*=\s*("|')ptc-highlightedSearchResult\2[^>]*>)[^<]*(</span>)
I'm able to select whatever comes in span and their content but not otherwise. Any help on NOT operation will be appreciated.