php matches Chinese with regular expression
<code>1.用.+ 可以匹配到一个以上的中文吗? 2.用这样的 '/你好,哈哈/' 去匹配中文会不会出现问题?</code>
Because I don’t know much about regular expressions, I would like to ask if there will be any encoding problems when matching regular expressions with Chinese characters?
php matches Chinese with regular expression
<code>1.用.+ 可以匹配到一个以上的中文吗? 2.用这样的 '/你好,哈哈/' 去匹配中文会不会出现问题?</code>
Because I don’t know much about regular expressions, I would like to ask if there will be any encoding problems when matching regular expressions with Chinese characters?
can match
Using /Hello, haha/, this will only match /Hello, haha/this.... because the two slashes before and after will be treated as normal content..
There are also problems with Chinese encoding. Just like if I use unicode characters to match Chinese with ordinary str type content in Python, it won’t match. I just need to cache the unicode encoding of the content