John W. Krahn wrote:
"Alan C." wrote:
<snipped>
Your code does the job just super! Thanks!Here is one way to do it:#!/perl/bin/perl -w use strict; my $text = do { local $/; <> }; $text =~ s/\n(?!\.|\z)/ /g; print $text;
The (|) parenthesis "group" with left side | right side sandwiched between the parenthesis
The | means "or" right?
then \z means end of string (end of my entire small amount of text)
According to MRE2, the ?! is a fail-look ahead position matcher of sorts that enables a match-fail combo characteristic so all possible matches are returned?
I'm too new. But, regexes for me to new heights with more study/practice!
--
Alan.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]