I have some javascript I need help with.
I have an image with a src tag. I would like to take the value of the src an replace it with a static value. The src value though is variable but always in the same structure.
So if my image url is:
a/en-uk/images/items/item_123456789_1_185x185.jpg
with javascript, I want to modify this to
a/en-uk/images/items/item_not_found_185x185.jpg
baring in mind, the a/en-uk/images/items/ and 123456789_1 parts the url are dynamic. So just want to replace 123456789_1 with not_found.
Any idea how I could do this with jquery? regexp?