[Chicago-talk] help with Reg Exp, pls...
lembark at wrkhors.com
Tue Dec 16 12:44:19 CST 2003
-- Walter Torres <walter at torres.ws>
>> -----Original Message-----
>> From: chicago-talk-bounces at mail.pm.org
>> [mailto:chicago-talk-bounces at mail.pm.org]On Behalf Of Steven Lembark
>> Sent: Monday, December 15, 2003 5:15 PM
>> To: Chicago.pm chatter
>> Subject: Re: [Chicago-talk] help with Reg Exp, pls...
>> Not really sure what you are asking for. "a test" could mean
>> nearly anything...
> I'm sorry kind people, I really didn't mean to be so obtuse about this...
Does your 99.99% include japanese, chinese, or russian
individuals? If so then you probably have to deal with
UTF in some form, at which point all best on what is
"reasonable" are off. If you restrict the names to
ASCII it works but then you reject all of the UTF8 accent's
shown in the example.
The simplest fix -- given that you may need to regex UTF
describing a name in any obscure language -- may be to just
use a check for [:isprint:] and be done with it: anything
that is not a printing character is probably not something
you want to deal with. It would also probably make sense
to use "join ' ', split" to strip extra whitespace and
convert all of it so singleton spaces.
Steven Lembark 2930 W. Palmer
Workhorse Computing Chicago, IL 60647
+1 888 359 3508
More information about the Chicago-talk