Short utility post. Two public gists I reuse:
- Bangla / Bengali Unicode regex cheatsheet (JS): https://gist.github.com/JehadurRE/99569193d8612d6eaf0e3191a9052d03
- Western ↔ Bengali digits (TS): https://gist.github.com/JehadurRE/59cf231f1be6775d5846868c0db860d7
The gotcha
Some Bangla words use the zero-width joiner U+200D, for example র্যাব (র + ZWJ + ্ + য + া + ব). U+200D is not in the Bengali block (U+0980–U+09FF), so:
"র\u200D্যাব ID: ১২৩".split(/([\u0980-\u09FF]+)/u).filter(Boolean) // ["র", "\u200D", "্যাব", " ID: ", "১২৩"] The word is split into three pieces. If you split mixed text into runs, allow U+200C and U+200D inside a Bangla run:
/([\u0980-\u09FF](?:[\u0980-\u09FF\u200C\u200D]*[\u0980-\u09FF])?)/u (Checked with Node on 2 Dec 2026. Test on your own data before relying on it.)
Not for Bijoy text
These ranges do not match legacy Bijoy / SutonnyMJ text. Detect or convert that first with bijoy2unicode, then apply them.