develooper Front page | perl.perl6.language | Postings from April 2005

Re: should we change [^a-z] to <-[a..z]> instead of <-[a-z]>?

Thread Previous | Thread Next
From:
Aaron Sherman
Date:
April 15, 2005 05:00
Subject:
Re: should we change [^a-z] to <-[a..z]> instead of <-[a-z]>?
Message ID:
1113566431.30841.116.camel@markab
On Thu, 2005-04-14 at 21:32 -0700, David Wheeler wrote:
> On Apr 14, 2005, at 7:06 PM, Patrick R. Michaud wrote:
> 
> > So,     <[a.z]>  matches "a", ".", and "z",
> > while   <[a..z]> matches characters "a" through "z" inclusive.
> 
> I was going to say that that was inconsistent, but since you never need 
> to repeat a letter in a character class, well, I guess it isn't. But 
> the first person to write <[a...]> gets what's comin' to 'em.

A silly question: is there a canonical character set from which we
extract these ranges? Are we hard-coding Unicode here, or is there some
way for the user to specify the character set for ranges?



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About