Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
How to print ending tag if the clsing tag doesnot exists before the start of another tag or start of character '[' Where the output should be like#!/usr/bin/perl while(<DATA>){ s/<(\w*)>(?![^<\w*\>]*<\w*\\>)/<\/$1>/g; print $_; } __DATA__ Susan Kempf<BR>LONGWOOD<BR> <p>Joe</p> DJ ROB-E ORLANDO<QC> BREAKZ, VOL. 2 <Hi>How r y</HI><br> [HELOO]
Susan Kempf<BR>LONGWOOD</BR><BR> </BR><p>Joe</p> DJ ROB-E ORLANDO<QC> BREAKZ, VOL. 2</QC> <Hi>How r y</HI><br> </br>[HELLO]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: close end tag
by ELISHEVA (Prior) on Aug 27, 2009 at 06:14 UTC | |
by Anonymous Monk on Aug 27, 2009 at 07:04 UTC | |
by Anonymous Monk on Aug 27, 2009 at 07:12 UTC | |
by Anonymous Monk on Aug 27, 2009 at 08:51 UTC | |
by Anonymous Monk on Aug 27, 2009 at 09:07 UTC | |
|
Re: close end tag
by ssandv (Hermit) on Aug 27, 2009 at 05:33 UTC | |
by ikegami (Patriarch) on Aug 27, 2009 at 07:00 UTC | |
by ssandv (Hermit) on Aug 27, 2009 at 15:47 UTC | |
by ikegami (Patriarch) on Aug 27, 2009 at 15:51 UTC | |
by ssandv (Hermit) on Aug 27, 2009 at 15:54 UTC |