The examples in this article describe the operators and descriptions in regular expressions. Share it with everyone for your reference, the details are as follows:
1. Ordinary characters
include all printing and non-printing characters that are not explicitly designated as metacharacters, such as upper and lower case letters, numbers, Punctuation marks, etc.
2. Metacharacters
Metacharacters are characters that have special meanings in regular expressions. Because metacharacters have a special meaning in regular expressions, these characters cannot be used to represent themselves and must be escaped by prefixing them with a backslash. The resulting escape sequence will match that character itself instead of Its special metacharacter meaning. For example, [ represents the beginning of a character set. If you want to match [ in a regular expression, you need to quote it like this: \[ to represent [ itself.
3. Non-printing characters
4. Predefined characters
5. POSIX characters
6. Qualifiers
Here are just based on different functions The classification of some operators used in regular expressions is not necessarily accurate, but is just to illustrate the operators in regular expressions.
I hope this article will be helpful to everyone’s learning of regular expressions.
For more detailed explanations of operators and descriptions of regular expression tutorials, please pay attention to the PHP Chinese website!