Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: regex to split on ' ', but skip spaces inside quotes

by artist (Parson)
on Sep 21, 2007 at 21:14 UTC ( #640441=note: print w/replies, xml ) Need Help??


in reply to regex to split on ' ', but skip spaces inside quotes

use quotewords from Text::ParseWords
use Text::ParseWords qw(quotewords); my $line = q(hi my name is 'john doe'); @words =quotewords(' ', 0, $line); print join "\n", @words,"\n";
--Artist

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2022-11-26 23:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?