Rob Dixon <[EMAIL PROTECTED]> wrote:
:
: > I tried all these substitutions. Unfortunately,
: > they also destroy words in the string like can't,
: > couldn't, what's, it's, and a multitude of others.
: > Anyone with any solutions?
:
: Hi.
:
: A totally different solution:
:
: $_ = q(This is a character d g string test. What's more is
: it's a winner and shouldn't fail.);
: print join ' ', grep { not /^[a-z]$/i } split;
:
: **OUTPUT
:
: This is character string test. What's more is it's winner
: and shouldn't fail.
Hmmm. I wonder:
$_ = q|It's a winner and shouldn't fail. Unless someone were prone to
separating sentences with two spaces.|;
print join ' ', grep { not /^[a-z]$/i } split;
__END__
Charles K. Clarkson
--
Mobile Homes Specialist
254 968-8328
It is impossible to make anything foolproof, because fools are so ingenious.
- Murphy's Eleventh Law
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>