POSIX style
. at
Can match cat sat mat #at点可以匹配任意字符
[A-z]at
[A-za-z]Match a collection class in square brackets
[^a-z]Represents a character that is not part of the collection * means that it can be repeated 0 or more times + indicates that it can be repeated 1 or more times
[[: alnum:]]+Indicates that there is at least one alphabetic character
()Parentheses are used to split sub-expressions (very) *large can match very large, very very large, large
{}The curly braces indicate that the number of repetitions allowed {3} is repeated 3 times, {2,4} means repeating the first four times, {2,} representing at least 2 repetitions ^bob representing a string at the beginning of the string that matches Bob com$ that matches a COM ^[a-za-z]$ at the end of the string that matches only one alphabetic character Use a vertical bar to denote branch selection com|edu|net means that when a COM or edu or net Match Special character is matched, a backslash \ is used to escape, and it needs to be escaped again in PHP.
Match e-mail address^[a-za-z0-9_\-.] [Email protected] [A-za-z0-9\-]+\. [a-za-z0-9\-.] +$
the regular lookup stringEreg (string pattern, string search, array [matches]); Eregi case insensitive
Regular Replacement stringString ereg_replace (string pattern, string replacement, string search);
Regular split stringArray split (string pattern, string search [, int max]);