Regex Validation for Hiragana

Hi,
Japanese here I think I asked about limiting the field entry to Kanji before but how can I limit a field to Hiragana only?

Usually
[\u3041-\u3096\u309D-\u309F]
or
[\p{Hiragana}]
will do but either is not working.

For those who are not familiar with our writing system,
we have three writing systems;Kanji, Hiragana, and Katakana.

Kanji is a set of Chinese characters that were adopted into the Japanese writing system over a thousand years ago. Each Kanji character represents a word or idea, and there are thousands of Kanji characters in total. Kanji is often used in formal writing and is an important part of the Japanese language.

Hiragana is a phonetic writing system that consists of 46 characters, each representing a syllable. It is used to write Japanese words that do not have corresponding Kanji characters, as well as grammatical particles and inflections. Hiragana is also used to write the pronunciation of Kanji characters, known as furigana, which is especially helpful for children or learners who may not be familiar with certain Kanji characters.

Katakana is another phonetic writing system that consists of 46 characters, each representing a syllable, just like Hiragana. However, Katakana is primarily used to write words borrowed from foreign languages, as well as onomatopoeic words and emphasis. For example, the English word “computer” is written in Katakana as “コンピュータ” (konpyu-ta).

Overall, Kanji, Hiragana, and Katakana all play important roles in the Japanese language and are necessary for reading and writing in Japanese.

https://www.ragic.com/intl/en/doc/20/Validation#:~:text=3040-309F,Hiragana
^[\u3040-\u309F]*$
Worked.

1 Like