How to close the tag if ending tag doesnot exists before any start of another '<'.#!/usr/bin/perl while(<DATA>){ s/<a\s\w*>\w*</<\/a>/; print $_; } __DATA__ <a href="www.google.txt>Click here<span>
<a href="www.google.txt>Click here<span>
In reply to close end tag by gem555
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |