Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Using punctuation to split a text

by mickeyn (Priest)
on Nov 04, 2006 at 08:36 UTC ( #582224=note: print w/replies, xml ) Need Help??


in reply to Using punctuation to split a text

almost ... :-)
split /[.!]/, $text;
anyway, I suggest you read perlre.

Enjoy,
Mickey

Replies are listed 'Best First'.
Re^2: Using punctuation to split a text
by UrbanHick (Sexton) on Nov 04, 2006 at 09:28 UTC

    So this should do the trick:

    @sentences =split([.?!\L], $text);

    Thank you for your help.

    -UH

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://582224]
help
Chatterbox?
and a soft breeze sighs...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2016-12-07 09:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (125 votes). Check out past polls.