Weird error with unicode regexp

I’m having trouble running a simple regular expression for name validation.

I’m trying to allow all unicode characters using the \p{L} tag. And numbers with \p{N}. However, I’m not sure why this isn’t supported. I even tried using an external library XRegExp. Is there a limitation in Nakama that disallows this?

Here is my regexp: /[\p{L}\p{N}-_]+/gu

Code snippet:

  const regex = /[\p{L}\p{N}\-_]+/gu;
  const input = 'Testing-123';
  var test = input.match(regex);

test always comes back as null.

Using a normal regexp without the \p{L} works fine… But then I can’t match characters in other languages…

Any help would be appreciated.


It looks like this is a ES6 feature…