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

Re: [FWP] TPJ One-Liner #39



>>>>> "RJK" == Ronald J Kimball <rjk@linguist.dartmouth.edu> writes:

RJK> Abigail once asked in clpmisc for a way to match uppercase characters in
RJK> the current locale.  I suggested:
 
RJK> $uc = '[^' . quotemeta(lc join('', map {chr} 0x00 .. 0xFF)) . ']';
 
RJK> $string =~ /$uc/;
 
RJK> Then Abigail said she actually wanted an elegant method.  :)

I vaguely recall Jarkko mentioning that uc(lc()) may not be idempotent,
in some locales. Does anyone know if this is real or only a figment
of my imagination?

What could elegant be? Each character has to be examined.

Jarkko's POSIX character classes is the only elegant one I can think of.

<chaim>
-- 
Chaim Frenkel					     Nonlinear Knowledge, Inc.
chaimf@pobox.com				               +1-718-236-0183

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe