Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: Splitting multiline string into words, the stuff between words, and newlines

by salva (Canon)
on Feb 25, 2022 at 09:22 UTC ( [id://11141637]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @fragments = grep length, split /(\b{wb}\w.*?\b{wb}|\n+)/, $book;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-05-26 21:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found