Regex to get part of image url (sublime text 3)

I have a XML database containing several thousand positions. Text + html tags (images and links). I need a regex for Sublime Text 3 to replace a portion of the every image url (everything before file name).

For example, I have this:

<img src="/images/fanart/bigfana2121rt/215627676.jpg">


<img src="/images/screenshots/goodlooking/tret/215627676.gif">

And I need to get this:


and this:


Thank you.

Source: regex

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.