Unicode Regex Support
Unicode Regex Support
Hello All,
In a discussion on the jQuery UI Wiki () it was mentioned that
supporting 'accented characters' (read: unicode characters) would be
something preferable.
Unicode support in regular experssions for javascript is pretty
sparse, and very specific. It's outline very well here
http://www.regular-expressions.info/unicode.html. Other languages and
platforms support a much wider unicode support ranage and make it much
easier to support unicode characters without much effort.
There's a pretty extensive regex library out there called XRegExp
(http://stevenlevithan.com/regex/xregexp/). IMHO it's overkill for
most of our needs in jq-ui. However, there is a plugin for it which
peak's my interest;
http://blog.stevenlevithan.com/archives/xregexp-unicode-plugin. This
basically adds support for unicode character blocks, which many other
languages support.
My immediate need for this stems from the work I've been doing on the
mask plugin in the dev branch, however this may prove useful elsewhere
in the future. Hacking this up a bit, we could, in theory add this as
a utility to the jq-ui core, or I could add this specifically as a
util just for the mask plugin. This will, however, add considerable
size to the mask plugin.
I'd like to open this up to the community for discussion, so please do
share your thoughts.
Thanks,
Andrew