Close all HTML unclosed IMG tags
Posted
by George Johnston
on Stack Overflow
See other posts from Stack Overflow
or by George Johnston
Published on 2010-03-12T15:39:55Z
Indexed on
2010/03/12
16:17 UTC
Read the original article
Hit count: 184
Is it possible to do a regex replace on all IMG tags that are unclosed? If so, how would I identify:
<img src="..." alt="...">
...as a potential canidate to be replaced?
= <img src="..." alt="..."/>
Update: We have hundreds of pages, and thousands of image tags, all must of which must be closed. I'm not stuck on RegEx -- any other method, aside from manually updating all IMG tags, would suffice.
© Stack Overflow or respective owner