Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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


Comment on Re: Using punctuation to split a text
Download Code
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2014-07-11 21:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (235 votes), past polls