My skills are very basic. I'm hoping to find a regular expression for Sublime Text 3 that finds a string by beginning and end. I'd like to keep the middle unchanged and I only want to replace the beginning and the end.
For instance. Search for url with /shop/
at the beginning and .htm at the end. I'd then like to replace /shop/
with /product/
and replace .htm
with a forward /
e.g.
http://www.website.com/shop/ford-truck-hitch-extension.htm
becomes
http://www.website.com/product/ford-truck-hitch-extension/
This bit finds the instances but I can't figure out how to replace the beginning and end.
shop[^<]+.htm