www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

unicodeRegexes.js (427B)


      1 const hangulRegex = /[\uAC00-\uD7AF]/;
      2 
      3 // This regex combines
      4 // - Hiragana: [\u3040-\u309F]
      5 // - Katakana: [\u30A0-\u30FF]
      6 // - CJK ideograms: [\u4E00-\u9FAF]
      7 // - Hangul syllables: [\uAC00-\uD7AF]
      8 // Notably missing are halfwidth Katakana and Romanji glyphs.
      9 const cjkRegex =
     10     /[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/;
     11 
     12 module.exports = {
     13     cjkRegex: cjkRegex,
     14     hangulRegex: hangulRegex,
     15 };