javascriptregexfarsi

Regex for Persian number


I want to create JavaScript Regex for checking value of textbox in range (U+06F0 to U+06F9) or (0-9) How can I build this?


Solution

  • Put the range inside a character class like below.

    ^[\u06F0-\u06F90-9]+$
    

    + repeats the previous token one or more times.