Home >Backend Development >PHP Tutorial >Related knowledge of regular expression \w \d
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!