Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Remove RTF Formatting

by TomDLux (Vicar)
on Feb 28, 2011 at 23:35 UTC ( [id://890665]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      LINE:
        while (my $line = <$INFILE> ) {
    ...
            #
            $text .= $line . $NEWLINE;
        }
    
  2. or download this
    next LINE if length $line == 1 and q{\} eq substr $line, 0, 1;
    
  3. or download this
    s/(?<=\n)\s+//;
    #or, line by line:
    s/\A\s+//
    
  4. or download this
    s/\s+\n//;
    
  5. or download this
    Readonly my $ESC_BACKSLASH => q{\\};
    Readonly my $NEWLINE => q{\n};
    $wholefile =~ s/$ESC_BACKSLASH\z//o;
    
  6. or download this
    Readonly my $RTF_CMD => qr/$ESC_BACKSLASH [\w-]+/xo;
    s/$RTF_CMD//;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://890665]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-03-29 13:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found