JavaScript regex for validating for alphanumeric characters,all international characters (Japanese, Chinese, Russian etc)

Go To StackoverFlow.com

3

One of my project requirements is to validate a data field(text box from web page). I need to allow alpha numeric characters in all foreign languages (japanese,chinese,korean,russian,latin american characters etc). And avoid special characters.

I am using the expression /[^a-zA-Z0-9]/ (javascript, asp .net page)

Many blogs I have read and not able to correctly understand what exactly I have to do here. I can't add any addons or plugins and have to use the available functionality of regex.

How do regex engine recognize other language characters (esp. Unicode)?

2012-04-04 07:54
by SNA
How about /^\w/ - mplungjan 2012-04-04 07:58
possible duplicate of Regular expression to match non-english characters?mplungjan 2012-04-04 08:00
Possible duplicate of Regular expression to match non-English characters?halfer 2017-02-15 08:46


3

You will need to use Unicode regular expressions. Please check this previous SO thread in which various unicode matching mechanisms are discussed.

2012-04-04 07:59
by npinti
Ads