I have a requirement where I need to modify html 'img' tags in an html string that do not end with a '/>'
ex: <img src="">
needs to be changed to <img src=""/>
I am using following regex: <img(.*[^/])>
to replace with <img$1/>
This works fine however for cases like: <center><img src=""/></center>
the regex returns: <center><img src=""></center/>
Any suggestions how to impact this regex only upto the end of the img tag? Thanks.