The relationship between PHP regular matching and file encoding

Source: Internet
Author: User
Although most experts think that it will affect the efficiency of the program, but do data collection, but it is difficult to avoid the use of regular, strong regular expression used very comfortable, but in the match Chinese, will appear, clearly the regular expression is not a problem, the character data contained in accordance with the regular expression of data, can be caught, at this time, It's time to stop and see if your matching data is encoded in the same format as your PHP script file. This is because we have a number of Chinese and coding methods, such as: Gbk,utf-8, when your php script file is GBK, and read the need to match the data encoding is UTF-8, they will not return the results you want (no area).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.