Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: regular expression: match multiple newlines

by Kenosis (Priest)
on Nov 03, 2013 at 19:55 UTC ( #1061066=note: print w/ replies, xml ) Need Help??


in reply to Re: regular expression: match multiple newlines
in thread regular expression: match multiple newlines

Good point! However, \n\s*\n would replace \n\x20\n --a space surrounded by two newlines--which is not two consecutive newlines, thus the prior \n{2,} suggestion.

Edit: My apologies. Didn't notice the the OP's mentioning the possibility of other whitespace between the newlines.


Comment on Re^2: regular expression: match multiple newlines
Select or Download Code
Re^3: regular expression: match multiple newlines
by Cristoforo (Deacon) on Nov 03, 2013 at 20:13 UTC
    He stated that there might be spaces between the newlines :-)

      You are indeed correct. My bad. Will strike my postings above.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (12)
As of 2014-09-17 20:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (99 votes), past polls