We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Character '¿' in regex

I'm trying to let put in the validator the ¿ character ('cause of my language), but when I set it with/without escaping (\¿ or ¿), I can send the char º to the regex and returns that it is valid (so I cannot include it in the regex). Anyone had this issue before?



51.2k

use /u option for UTF-8

    preg_match('/¿/u')


33.8k
Accepted
answer