Matching Unicode letter characters in PCRE/PHP

后端 未结 5 1038
别跟我提以往
别跟我提以往 2020-11-22 01:13

I\'m trying to write a reasonably permissive validator for names in PHP, and my first attempt consists of the following pattern:

// unicode letters, apostrop         


        
5条回答
  •  野的像风
    2020-11-22 01:28

    Anyone else looking here and not getting this to work, please note that /u will not produce consistent result with Unicode scripts across different PHP versions.

    See example: https://3v4l.org/4hB9e

    Related: Incosistent regex result for Thai characters across different PHP version

提交回复
热议问题