Today I needed to replace links on my product import .csv file with links of their contents as I don’t want links to other sites on my web shop. So I used Sublime Text for Mac to do it.

You just go to Sublime Text menu -> Find -> Replace and put such regexp there:

[^>]*<a\s+href=””http://somelink\.com.*?””>(.*)</a>

 

Link replace regular expression

Hopefully it will help someone. Cheers!

 

Leave a Reply

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