Home  >  Article  >  Backend Development  >  Related knowledge of regular expression \w \d

Related knowledge of regular expression \w \d

一个新手
一个新手Original
2017-09-13 09:57:191609browse

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!

Statement:
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 admin@php.cn