Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Regex with newline

by voyager (Friar)
on Apr 04, 2001 at 23:01 UTC ( [id://69798]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $text = get_text_from_db(..);
    $text =~ s|\n|<br />|sg;
    
  2. or download this
    $text =~ s|\n\n|<br /><br />|sg;
    $text =~ s|\n{2}|<br /><br />|sg;
    
  3. or download this
    $text =~ s|\n{2}(^<)|<br /><br />$1|sg;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-25 23:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found