Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check whether a string contains Japanese/Chinese characters

Tags:

People also ask

Does China and Japan use the same characters?

Unlike English, both languages incorporate symbols rather than just an alphabet. To be sure, Japanese does have a phonetic alphabet, two in fact. It also uses Chinese characters called kanji. Kanji, as well as Japan's two phonetic alphabets (hiragana and katakana) were derived from Chinese characters.

Do Japanese names use Chinese characters?

Japanese names are usually written in kanji (Chinese characters), although some names use hiragana or even katakana, or a mixture of kanji and kana.

Are Chinese and Japanese characters related?

While most of the Japanese characters are still the same as the traditional Chinese characters and mostly with similar meanings, there are some differences: Japanese Kanji has two different pronunciation systems for Chinese characters: “kun'yomi” (for original Japanese words) and “on'yomi” (for borrowed Chinese words).


I need a way to check whether a string contains Japanese or Chinese text.

Currently I'm using this:

string.match(/[\u3400-\u9FBF]/);

but it does not work with this for example: ディアボリックラヴァーズ or バッテリー.

Could you help me with that?

Thanks