gem555 has asked for the wisdom of the Perl Monks concerning the following question:
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>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: close end tag
by jbt (Chaplain) on Aug 21, 2009 at 10:47 UTC | |
| |
|
Re: close end tag
by Utilitarian (Vicar) on Aug 21, 2009 at 11:01 UTC | |
|
Re: close end tag
by Anonymous Monk on Aug 21, 2009 at 11:23 UTC | |
|
Re: close end tag
by Anonymous Monk on Aug 21, 2009 at 10:49 UTC |