Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: split $data, $unquoted_value;

by Codon (Friar)
on Sep 14, 2005 at 20:40 UTC ( [id://492006]=note: print w/replies, xml ) Need Help??


in reply to split $data, $unquoted_value;

Put this in your split and see how it fits:
my $re = qr/(?<!["'])(?<=\.)\s*(?!["'])/;
This will split behind the period, but only if it is not (directly) quoted.

Edit: added \s* to strip out space between sentences.

Ivan Heffner
Sr. Software Engineer, DAS Lead
WhitePages.com, Inc.

Log In?
Username:
Password:

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

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

    No recent polls found