Archive for May, 2009




International data regex validation

Author: TheHahn
May 22, 2009

Currently coding a site that is going to required international characters. I’m being very diligent in my data validation, so I want to lock the characters down with regular expressions. There isn’t any one metacharacter to encapsulate them all. So looking at a unicode table one can grab a range of characters.

[\u0041-\u005A] Matches A-Z
[\u0061-\u007A] Matches a-z
[\u00C0-\u0233] Matches À-ȳ

Could just put (adding digits) [\d\w\u00C0-\u0233]