Related knowledge of regular expression \w \d

一个新手
Release: 2023-03-16 06:18:02
Original
1458 people have browsed it

After consulting many related regular descriptions, I found that the definition of \w refers to containing uppercase and lowercase letters, numbers and underscores, which is equivalent to ([0-9a-zA-Z]) (based on the classic tutorial Regular Rules 30-minute introductory tutorial on expressions)

However, in actual use, I found that this is not the case. It can also be said that it actually does not only include ([0-9a-zA-Z_]) these data,

The following is a test screenshot tool for editplus:

actually includes Greek letters and Russian letters in addition to ([0-9a-zA-Z_]) etc.;

So if you need to pay attention to the specific matching data when registering user information, you must not use it directly\wThat's it.

The above is the detailed content of Related knowledge of regular expression \w \d. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!