Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stripping HTML tags with Perl





"Drew C. Poulin" wrote:
> 
> while (<>) {
>         s/diff .*?\n//ig;     #delete lines beginning with diff(sp)
>         s/[0-9].*?\n//ig;
Deletes all between a number and \n  (like the "3>" part)
>         s/\^M//ig;
>         s/<.*?>//ig;
Does not match, since the "3>" is already removed.
>         print;
> 
> }

/Fredric Fredricson

Btw, the i switch is meaningless for all but the first statement and
the "s/\^M//ig" looks kind of weird. Do you mean "s/\r//g" ?


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links