in reply to Re: isAlpha / isNumeric
in thread isAlpha / isNumeric

...well, yeah. But if you ask me an "alphabet" regex (in any alphabet) has pretty limited utility. I've always used /\w/ which at least in Perl 5.6 is Internationalized (I think.)

And without sparking any huge debate on the merits of internationalization everyone should program to the type of data they expect to have to deal with. If the poster's code is going to be used in an environment of all-English speakers there's no internationalization problem at all. If it's in a CGI on the Internet he/she may want to consider other options. Limiting code to one language is not prima facia a bad thing... internationalization is just one more area to optimize if you need it.

Gary Blackburn
Trained Killer

Replies are listed 'Best First'.
Re: Re: Re: isAlpha / isNumeric
by lhoward (Vicar) on Mar 22, 2001 at 19:14 UTC
    I think that it is very shortsighted to assume that your "alphabet" is only A-Z when you can support characters from other alphabets with in your code with no additional effort. Even if your applicaiton is %100 targeted to a English speaking, US audience you will run into occasions where you want to use accented characters: El Niño, Björk, Café, etc.... IMHO, limiting your code to work on A-Z only is asking for trouble later on (like using a 2 digit year). Why limit yourself when you don't have to?