I am trying to read input and pass it only if it is a Japanese kanji. That means the character falls somewhere between 4e00 and 9faf, according to http://www.rikai.com/library/kanjitables/kanji_codes.unicode.shtml
Is it possible using Javascript to test over this range?
/[\u4e00-\u9faf]+/should do it. That matches one or more characters in the range4e00 - 9faf.From the the MDN documentation:
So in your case, if you want to test the whole string, you probably want: