View Single Post
  #4  
Old 12-12-2011, 05:29 AM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
Quote:
Originally Posted by Chompy View Post
Thanks for pointing that out haha, didn't realize.
Ah, well, it's not that you can't mix lower and upper case in ranges, it's just that B < a lexicographically, so the correct range would be [B-a], which includes B, C, ... Z, [, \, ], ^, _ , `, and finally a.

I think what you wanted for [a-B] is actually [ABa-z].

e: I've done some testing and transliteration to e.g.
PHP Code:
[a-z] -> getascii(cin |getascii("a"), getascii("z")| 
works properly with arbitrary bounds (as long as they are properly parsed*) and even "broken" ranges like [a-B].

*Consider [[-]] and [\[-\]].
__________________
◕‿‿◕ · pfa · check yer syntax! · src

Killa Be: when i got that locker in 6th grade the only thing in it was a picture of a midget useing a firehose :/
Reply With Quote