I have this for exapmple
<img style="height:375; width:500;" src="../img/ris1_1.jpg" ALIGN="center">
<img src="img/ris1_2.jpg" style="height:375; width:500;" ALIGN="center">
I used this RegExp to replace src tag:
(?<=(<img src=['"]))[^"']+
But it finds only imgs where src comes right after
Also I need to replace only relative paths, not absolute. So if I have absolute path in src I must not replace it.
P.S. Yeah! I've done, thanks Shomz for that! Just do this:
tag.replace(/(img[^>]*src=['"])+(?!http:\/\/)\s*([^'"]*)/gi,"$1http://mydomain.com/$2");
.srcproperty