Skip to content

Instantly share code, notes, and snippets.

@osddeitf
osddeitf / Vietnamese-Regex.md
Last active July 1, 2020 13:38
Regex for capturing Vietnamese characters.

Regex to capture Vietnamese characters (aăâbcdđ..., àáảãạ).

/^[a-z\u0111\u0300\u0301\u0302\u0303\u0306\u0309\u031b\u0323]+$/i

Usage:

regexp.test(str.normalize('NFD'))

Vietnamese characters actually not having 'fjwz', I'm just lazy so I use a-z instead.