Regex to remove URLs inside WordPress Post

There were time where I have to take down a web apps and making thousands of URL reference broken. So the only way to fix that is to remove all those links. Thankfully wordpress has a vast variety of regex search and replace.

I am using Search Regex plugins (You can find it on WP Plugins directory)

/<a href="http:\/\/www\.domain\.com\/subfolder\/[^>]*>([\s\S]*?)<\/a>/

Refer to the screenshot below.

Screen Shot 2016-06-20 at 2.16.49 PM

One comment on “Regex to remove URLs inside WordPress Post”

  1. wow lovely days those were .. na koi preshani na kuch auronly mauj masti and fun .. good old days i loved this one brought some beiutaful memories … Thank you D.I.

Leave a Reply

Your email address will not be published. Required fields are marked *