I have Wordpress site. My task find all internal links without href ancors, and text of link exclude img tag. Now I have:
/<a[^>]+href\s*=\s*["'](?!(?:#|javascript\s*:))([^"']+)[^>]*>.*?<\/a>/si
Now retrun:
<p style="text-align: justify;"><a href="http://happymodern.ru/wp-content/uploads/2014/06/бар_19.jpg"><img class="alignnone wp-image-34 size-full" src="http://happymodern.ru/wp-content/uploads/2014/06/бар_19.jpg" alt="бар_19" width="784" height="560" /></a></p> <p style="text-align: justify;">
My task find all link with text (without ancor and image tag) for examp <a href="/category/testpsot">text contain</a>
and delete link and leave the text
text contain
PS: I am use plugin https://wordpress.org/plugins/search-regex/