Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Making a regex case insensitive

by Moron (Curate)
on Mar 07, 2007 at 13:49 UTC ( #603604=note: print w/replies, xml ) Need Help??


in reply to Making a regex case insensitive

Once upon a time this was a sensible question. Character sets such as EBCDIC and ASCII were designed so that everything could be shifted or unshifted by unsetting or setting a bit in the binary code. For example, in the original ASCII, unsetting the 32 bit not only shifts from 'a' to 'A', but also from ';' to '['. Unfortunately it is unclear why it happened, whether the ASCII convention itself contains not even a single technical provision (just a long featureless vomit of impreganable legalese) or because the whole idea got overlooked when a plethora of nastily unpredictable keyboards started arriving in front of us intended to support different languages or whatever (just an excuse for incompetence - there was no need to botch ASCII). Nor is it clear whether the technical standards behind ASCII (probably an IEEE standard actually) was just Microshafted and/or IBuMmered as well, but suffice to say the concept of a shift key got severely corrupted with total loss of consistency and Perl, which came to be after the Great IBM/Microsoft Disaster had only the bare bones left to pick through, hence the whole concept of case for Perl being limited to alpha only.

Update: actually in a way the ASCII ctrl key survived more than the shift key! (for example CTRL-C is "C" with the 64 bit unset = ascii 3) and that is more consistently implemented on keyboards, probably because the hordes of typists from all over the world didn't actually use it to type a letter on IBM word processors, so it remained unIBuMerred until it was later Microshafted: I.e. in another sense it didn't, for example, CTRL-C (ascii-cancel) while surviving to some extent on Unix and Linux won't work the same way under Windows. Unfortunately, the ASCII ctrl key is partially impaired on *Nix owing to the attempt to make e.g. Open Office transparent for the ex-Windows user. (ALT-C would have been a better idea for "copy" in regard to preserving the existing standards for keyboards).

-M

Free your mind

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://603604]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2022-12-09 12:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?