Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I read a lot of files of very raw textual data and if the parsed data tastes good, it gets stored in a DB for analysis, if not, kicked out as error.

Its going to be fun watching people who do used the POSIX functions try alternatives. /[A-Za-z]/, I'd like you to meet umlat-u. The POSIX depended on the locale of the installed software which, assuming that's a feature and not a bug (usually its a bug) it'll be interesting to watch people reimplement that "functionality".

This is a fun 13 year old place to start WRT "simple" data verification, not because it exhaustively covers everything, but its watching a noob start from the beginning and hit about ten different roadblocks. There are plenty more of course.

http://www.perlmonks.org/?node_id=66320



There's a regex character class for that

Alphabetical only? $value =~ /[[:alpha:]]/

Ascii only? $value =~ /[[:ascii:]]/

http://perldoc.perl.org/perlrecharclass.html#Bracketed-Chara...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: