Recently, I attempted to implement a regular expression in TypeScript:
I ran the following code: const pass = /^[\pL\pM\pN_-]+$/u.test(control.value) || !control.value;
To my surprise, an error occurred:
"Category shorthand not allowed in this regular expression dialect in Typescript"
Can someone shed some light on why this error is popping up and suggest possible solutions to resolve it?