[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Change "WORD" to "Word"



On Tue, 6 Jan 1998 20:04:54 -0500, you wrote:

>I'm trying to change words that are in all upercase to upper and lower.
>And i can't seem to come up with a logical way to achieve this.
>
>Here's my problem... I'm writing a script for our sports section to
>process the NBA boxscores for publication.
>
>Far too often AP sends words in the file in all uppercase and we change
>them. For example: L.A. LAKERS, PHILADELPHIA, SAN ANTONIO.

I've noticed a lot of solutions to this problem already, but none looks
as simple as mine. So here goes:

	s/(\w+)/\u\L$1/g;

That's it.

	Bart.

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch