Detect if PCRE was built without the --enable-unicode-properties or --enable-utf8 configuration switches

前端 未结 2 1818
悲&欢浪女
悲&欢浪女 2020-12-17 15:30

I\'ve a PHP library that uses a number of regular expressions featuring the \\P expressions for multibyte strings, e.g.

((((?:\\P{M}\\p{M}*)+?)|         


        
2条回答
  •  醉酒成梦
    2020-12-17 16:26

    Other than trying it, I think the only way is to use the pcretest command line tool, with the -C option (compile-time options):

    bash-4.1.5$ pcretest -C
       No UTF-8 support
       No Unicode properties support
       Newline sequence is LF
       \R matches all Unicode newlines
       Internal link size = 2
       POSIX malloc threshold = 10
       Default match limit = 10000000
       Default recursion depth limit = 10000000
       Match recursion uses stack
    

提交回复
热议问题