At 5:23 PM -0700 7/19/08, Gary Kline wrote:
>Guys,
>
>Is there an easyy way of splitting yp these tags into one-per-line?
>I'm not obcessive [[?, :)]], but for what I've got in mind, the tags and stuff
>would look better to my eyes?  ....the outcome of this will go ino a special
>database, not html .
>
>is there some clever perl one-liner that would help me turn
>
><CENTER><FONT face="Times" size="3"><FONT color="#333366">Realization<BR>
>
>into
>
><CENTER>
><FONT face="Times" size="3">
><FONT color="#333366">
>Realization
><BR>

I've been using this ...

#!/usr/bin/perl
# Process HTML data on STDIN into one tag per line form on STDOUT
while (<>) {
        s/\r/\n/gs;
        s/</\n</gs;
        s/>/>\n/gs;
        s/\n\s*/\n/gs;
        s/^\s*//;
        print "$_"
}

... for quite some time under the name "tag1". It's come in very handy.
-- 

Walter M. Pawley <[EMAIL PROTECTED]>
Wump Research & Company
676 River Bend Road, Roseburg, OR 97470
         541-672-8975
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to