My application was relying on this function to test if a string is Korean or not :
const isKoreanWord = (input) => {
const match = input.match(/[\\u3131-\\u
Here is the unicode range you need for Hangul (Taken from their wikipedia page).
U+AC00–U+D7AF
U+1100–U+11FF
U+3130–U+318F
U+A960–U+A97F
U+D7B0–U+D7FF
So your regex .match
should look like this:
const match = input.match(/[\uac00-\ud7af]|[\u1100-\u11ff]|[\u3130-\u318f]|[\ua960-\ua97f]|[\ud7b0-\ud7ff]/g);