I've been having a small problem in regex in production. I know this is so very simple, but I was annoyed by this issue.
All I need is to allow "ñÑ" string to save in my database. This is all working in my Local, the problem is when I deployed to production its not working anymore.
OS Server: Ubuntu
regex used: "/^[a-zA-ZÑñ0-9\s-]+$/"
Did anyone encounter this? Is there any setup or I need to install in the Ubuntu Server? Please help. Thanks.
----------------------------------------------------------------
Update: I added a modifier u
to my regex:
regex used: "/^[a-zA-ZÑñ0-9\s-]+$/u"
And I get this error:
invalid UTF-8 string at offset 11