Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 musing on the Monastery: (4)
As of 2024-04-18 04:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found