const cc = "[a-z]"
const sep = "[-.]"
const r = new RegExp(`(${cc}+${sep})*${cc}+`)
Might /\p{Alpha}/u
to match everything with the Unicode property alphabetic be useful for your purposes?
const cc = "[a-z]"
const sep = "[-.]"
const r = new RegExp(`(${cc}+${sep})*${cc}+`)
Might /\p{Alpha}/u
to match everything with the Unicode property alphabetic be useful for your purposes?