Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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

by artist (Parson)
on Sep 21, 2007 at 21:14 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2024-04-20 03:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found