Eric Sisler wrote:

Ok, I'm tired of banging my head against this one.  I know there must be
a simple perl, sed or tr solution, but I can't seem to find it.  I'm
cleaning up some extracted data and the one annoying thing I have left
is a single quote followed by a capital letter, which I want to change
to lowercase like so:

Can'T -->  Can't
Santa'S --> Santa's

and so on.

Any ideas greatly appreciated.

-Eric



In perl, how about

$_ = "Can'T eat shan'T eat Jane'S cooking.";
s/'T /'t /g;
s/'S /'s /g;
print $_;

Assuming it's only T and S.

Geoff


-- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to