Last active
May 5, 2022 08:30
-
-
Save eimg/3ca350f937228a2c7187ca920dcddf4b to your computer and use it in GitHub Desktop.
A regular expression example to us in counting Burmese syllabus in a string.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// RegEx to count syllabus a string | |
// with Burmese content | |
"မန္တလေးမြို့မှ XYZ စတိုး (၂) ကို ဒီလမ်းအတိုင်း ဖြောင့်ဖြောင့် သွားပါ".match( | |
/([က-ဪ](?!်|္|့်)|[ဿ-၏]|[!-~]|\s)/g | |
).length; | |
// => 29 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment