Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime: replace everything between quotes

I need some help with Regular expression to Search and Replace in Sublime to do the following.

I have HTML-code with links like

 href="http://www.example.com/test=123" 
 href="http://www.example.com/test=6546" 
 href="http://www.example.com/test=3214" 

I want to replace them with empty links:

 href="" 
 href="" 
 href="" 

Please help me to create a Reg. ex. filter to match my case. I guess it would sound like "starts with Quote, following with http:// .... ends with Quote and has digitals and '=' sign", but I'm not very confident of how to write this in Reg. ex. way.

like image 944
Albert Avatar asked Mar 17 '23 09:03

Albert


1 Answers

(?<=href=")[^"]*

Try this.Replace by empty string.

See demo.

https://regex101.com/r/sH8aR8/40

like image 77
vks Avatar answered Mar 27 '23 11:03

vks