Prev: FAQ 9.14 How do I make sure users can't enter values into a form that cause my CGI script to do bad things?
Next: FAQ 9.17 How do I check a valid mail address?
From: Dr.Ruud on 29 Mar 2010 15:00 Steve M wrote: > To access a literal '.' you need to backslash it Or quotemeta it, or put it in a character class, or mention it as \x2E, etc., etc. -- Ruud
From: Uri Guttman on 29 Mar 2010 15:24 >>>>> "R" == Ruud <rvtol+usenet(a)xs4all.nl> writes: R> Steve M wrote: >> To access a literal '.' you need to backslash it R> Or quotemeta it, or put it in a character class, or mention it as R> \x2E, etc., etc. i would never encode a literal . as \2e. too obscure and what about unicode (not that i am anything but an ascii bigot! :)? i generally use \. but [.] is ok imo. uri -- Uri Guttman ------ uri(a)stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
From: Dr.Ruud on 29 Mar 2010 15:37 Uri Guttman wrote: > i generally use \. but [.] is ok imo. The performance loss was lifted in 5.10, IIRC. -- Ruud
From: Uri Guttman on 29 Mar 2010 16:21 >>>>> "R" == Ruud <rvtol+usenet(a)xs4all.nl> writes: R> Uri Guttman wrote: >> i generally use \. but [.] is ok imo. R> The performance loss was lifted in 5.10, IIRC. i wasn't concerned with performance but style. the hex version of . is what i never want to see. i don't need to look up hex codes to see you are trying to match a literal . :) uri -- Uri Guttman ------ uri(a)stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
From: Dr.Ruud on 29 Mar 2010 17:51
Uri Guttman wrote: > Ruud: >> Uri: >>> i generally use \. but [.] is ok imo. >> >> The performance loss was lifted in 5.10, IIRC. > > i wasn't concerned with performance but style. the hex version of . is > what i never want to see. i don't need to look up hex codes to see you > are trying to match a literal . :) Don't shoot the messenger. :) I don't understand why you reply on content that was no longer there. And you are repeating what you expressed before. I also don't understand why you assume that I addressed any concern of yours. I merely stated a "fact". (but it could be in 5.10.1 or later too) -- Ruud |