I would like to replace with javascript all image paths from a string with the img tag. Would I need a reg exp for this or a script ?
Image name and ext can be different in my string. In other words I have different images.
Replace ../IMG/epi.gif with
<img src="img/epi.gif">
initial string
"This image ../IMG/epi.gif and this image ../IMG/secondImage.jpg are not good"
needed result will be
'This image <img src="img/epi.gif"/> and this image <img src="img/secondImage.jpg"/> are not good'