PHP Regular Expression
In string match, one Regular Expression pattern can usually match multiple strings which is sometimes very useful.
Regular Expression functions include preg_match(), preg_replace(),
$arr = array("Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday");
foreach($arr as $dy)
Regular Expression Syntax:
Escape special characters, e.g. \\ is "\", \+ is "+"
Alternation match. e.g. /(e|d)n/ matches "en" and "dn"
Any character, except \n or line terminator
Any character except a and b
All uppercase A to Z letters
All lowercase a to z letters
All Uppercase and lowercase a to z letters
i occurs n times in sequence
i occurs n1 - n2 times in sequence
i occures >= n times
Carriage return character
Unicode with 4 characters of hexadecimal code hhhh
Character with 2 characters of hexadecimal code hh
Lookahead matches only if i is followed
Lookahead matches only if i is not followed