Literal Characters
The most basic regular expression consists of a single literal character, e.g.: a. It will match the first occurrence of that character in the string. If the string is Jack is a boy, it will match the a after the J. The fact that this a is in the middle of [...]
Tags: learn regular expression, PHP tutorial, regex rules, Regular expression tutorial
Regular Expression Basic Syntax Reference
Characters
Character
Description
Example
Any character except [\^$.|?*+()
All characters except the listed special characters match a single instance of themselves. { and } are literal characters, unless they're part of a valid regular expression token (e.g. the {n} quantifier).
a matches a
\ (backslash) followed by any of [\^$.|?*+(){}
A backslash escapes special characters to suppress their [...]
Tags: learn regular expression, Regular Experesion, Regular expression tutorial