Click here to Skip to main content
15,609,188 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How do I validate devnagari script in regex

What I have tried:

How do I validate devnagari script in regex
Updated 25-Sep-20 2:20am

1 solution

Reference: regex - How to detect if a string contains hindi (devnagri) in it with character and word count - Stack Overflow[^]
To find out, if a string contains a Hindi (Devanagari) character, you need to have a full list of all Hindi characters. According to this website, the Hindi characters are the hexadecimal characters between 0x0900 and 0x097F (decimal 2304 to 2431).

The regular expression pattern needs to match, if any of those characters are in the set.

As shared here: javascript - Regular expressions with Indian characters - Stack Overflow[^]
[\u0900-\u097F]+// \uFFFF format supported by Java,.net
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900