**1) Period ** . :
This matches any single character.
Example a): c.t will match cat, cbt, cct, and so on?
2) Plus +:
This will repeat the previous match one or more times.
Example a): _a+_ matches _a, aa, aaa,_ and so on...
Example b): _(ab)+_ matches _(ab), (abab), (ababab)_, and so on?
3) Asterisk *:
This will repeat the previous match zero or more times.
Example a): _a*_ matches, empty strings, _a, aa, aaa,_ and so on...
Example b): (_ab)*_ matches empty strings**,** _ab, abab, ababab,_ and so on?
4) Question ?:
This will do an optional match.
**Example a): ** colou? r will match color and colour.
5) Backslash \:
This will escape the next character.
Example a): \. will match .(dot) and not any single character.
6) Tilde (or anchor) ^:
This will match the beginning of the string
**Example a): ** ^a will match any string starting with a.
7) Dollar Sign $:
This will match the beginning of the string
Example a): a$ will match any string ending with a.
8) Parenthesis ( ):
This will group several characters into a single unit.
Example a): _(ab)+_ matches _(ab), (abab), (ababab),_ and so on?
Example b): _(ab)*_ matches empty strings**,** _ab, abab, ababab,_ and so on?
8) Bracket **[ ]**:
This will match one of the characters.
Example a): c[abc]t will match cat, cbt. cct.
9) Bracket [ ^ ]:
This is negative character class and will match any character which is not present there.
Example a): c[^a]t will not match cat but will match cbt, cct, cdt, etc.
mod_rewrite an Apache module which allows us to rewrite URL requests that come into our server.
Uses: