Re: PHP regular expression summary
character description
\ to mark the next character as a special character, or a literal character, or a backward reference, or a octal escape character. For example,'n'matches the character "n". '\n'matches a newline. The sequence "/" matches "", while "" (") matches" ".
> matches the starting position of the input string. If you set the Multiline property of the RegExp object, ^ also matches the position after \n'or \r'. The
$match is the end position of the input string. If the Multiline property of the RegExp object is set, $also matches the position of \n'or \r'.
* matches the preceding subexpression zero or multiple times. For example, zo* can match "Z" and "zoo". * equivalent to {0,}.
matches the preceding sub expression one or more times. For example,'zo can match "Zo" and "zoo", but can not match "Z". It's equivalent to {1,}.
matches the preceding subexpression zero or once. For example, "do (ES)?" can match "do" or "does" in "do". It is equivalent to {0,1}.
{n} n is a non negative integer. Match the determined n times. For example,'o{2}'can not match the "o'" in "Bob", but it can match the two o in "food".
{n,} n is a non negative integer. Match at least N times. For example,'o{2, "can't match" o'in "Bob", but can match all o in "Foooood". 'o{1, X 'is equivalent to' o '. 'o{0, X '' is equivalent to 'o*' '.
{n, m} m and N are non negative integers, of which n