Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Tricky regex problem

by nysus (Parson)
on Jul 22, 2020 at 15:05 UTC ( [id://11119658]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $input_text =~ s/^###*\s+[^\n]+\s+(?=^##)//gsm;
    
  2. or download this
    ## This gets stripped
    
    ...
    
    ## More headers
    blah blah
    
  3. or download this
    ## This should not get stripped, but it does
    
    ...
    #### This should also not get stripped
    
    ##### But it does
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-04-26 05:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found