Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

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


in reply to Re^6: Splitting multiline string into words, the stuff between words, and newlines
in thread Splitting multiline string into words, the stuff between words, and newlines

This seems to work too:
my @fragments = $book =~ /\G(?:[^\n\w]+?\b{wb})+|.+?\b{wb}/sg;
  • Comment on Re^7: Splitting multiline string into words, the stuff between words, and newlines
  • Download Code

Log In?
Username:
Password:

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

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

    No recent polls found