Javascript RegExp Unicode Character Class Tester

February 14, 2007

Javascript developers can test regular expressions against all unicode characters with my Javascript RegExp Unicode Character Class Tester

Very useful if you need to know exactly which characters  match a RegExp like /\s/

Interesting results from Firefox 2

  • \d matches 159 digit characters from many alphabets (not just Basic Latin)
  • \s matches 22 different types of whitespace: [\t\n\v\f\r \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000]

Useful docs:

Hope you find this useful and feel free to leave comments.