Php uses regular expressions to match Chinese characters {code...}. because I do not know much about regular expressions, I would like to ask if the regular expressions will cause encoding problems when matching Chinese characters? Php matches Chinese characters with regular expressions
1. Can I use. + to match more than one Chinese character? 2. Will there be any problem if you use this '/Hi, haha/' to match Chinese characters?
Because I do not know much about the regular expression, I would like to ask if the regular expression is encoded when matching Chinese characters?
Reply content:
Php matches Chinese characters with regular expressions
1. Can I use. + to match more than one Chinese character? 2. Will there be any problem if you use this '/Hi, haha/' to match Chinese characters?
Because I do not know much about the regular expression, I would like to ask if the regular expression is encoded when matching Chinese characters?
-
Yes
-
Use/Hello, haha/. it can only match/hello. haha/this... because the two front and back slashes will be treated as common content ..
There are also some Chinese encoding problems, as if I am in Python, the normal str type content, with unicode characters to match Chinese, will not match, the content cache unicode encoding will be good