Regex match_all phrase or tag inside another tag using mask? -


i have html like:

<html>     <span class="b-serp-url__item">newdomain.com</span>     <span class="b-serp-url__item">usa</span>     <span class="b-serp-url__item">u.s.a.</span>     <span class="b-serp-url__item">new<a href="#1">bad.com</a>usa</span>     <span class="b-serp-url__item">new<b>domain</b>.com</span>     ... </html> 

how can match content of <span> tag if contain domain name or domain name plus <b> tag? i'd regexp match new<b>domain</b>.com , new<b>domain</b>.com in example above.

i tried use <span class="b-serp-url__item">(?:(?!<[^b]+).*?)\.(?:(?!<[^b]+).*?)</span> match new<a href="#1">bad.com</a>usa. can suggest how using regex only?


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -