Regex, replace path to resource, modify resource name
- by jerome
Hi all,
I'd like to use a JS regex to take a string such as the following:
'http://www.somedomain.com/some_directory/some_other_directory/some_image.jpg'
And turn it into this:
'http://www.some_other_domain.com/another_directory/yet_another_directory/size1_some_image.jpg'
Any hints? Additionally, any pointers for books or other resources that give a gentle introduction to mastering regexes in JS and other languages?