1

I need to prevent the user input Chinese character. My code:

/^[^\u4E00-\u9FA5]^$/;

The result is , the input must be Chinese character input instead of prevent. Whats wrong with my code??

user2210819
  • 145
  • 2
  • 14
  • 1
    post code not an image. –  May 31 '13 at 04:21
  • Note: It's generally preferred that code snippets are posted as text. To format text as a block of code, prefix each line with 4 spaces. The editor also has a `{}` button that can add the prefix to selected text. – Jonathan Lonowski May 31 '13 at 04:22

1 Answers1

3

Try

chiregex: /^[^\u4E00-\u9FA5]*$/
Arun P Johny
  • 384,651
  • 66
  • 527
  • 531