Is there a way to use a regular expression with the unicode category in Postgres?

33 Views Asked by At

I have a table with a username field and want to allow only letters, but include letters from all languages (including Umlauts). So I added a check to that field with a regular expression.

That’s where the unicode category would be perfect: \p{Letter}

Unfortunately, unicode categories are not supported by postgresql.

I tried creating a PLV8 function that uses the syntax, but it seems that PLV8 doesn’t support it either.

Is the only option to actually list all the characters?

0

There are 0 best solutions below