in reply to Re: Perl Split
in thread Perl Split
Of course, things like "Mr. Smith", etc. will make it... a little more complicated. (Full stops not followed by space "are left as an excercise for the reader.")$_ = "Next line (2.) contains a url. The url is perlmonks.org. Send th +em \$20.00.\n"; @sentences = split(/(?<=\.)\s+/); print "$_\n" for ( @sentences );
|
|---|