Matching text with Special meta-characters using Regular Expressions
Regex are more powerful and we want to do more than simply search for literal pieces of text. There are certain reserved meta-characters with Special uses and meaning. These "metacharacters" are: the square bracket [...], the backslash \, the caret ^, the dollar sign $, the period or dot ., the vertical bar or pipe symbol |, the question mark ?, the asterisk or star *, the plus sign +, the round bracket (…) and the Curly Brace {…}.
Below table well explain us with the usability of each metacharacter.
| Table 1: Regular Expressions Metacharacters | |
| meta-character | Definition ( or Use) |
| ^ | Start of a string. |
| $ | End of a string. |
| . | . Any character (except \n newline) |
| | | Alternation: state to another and back again. |
| {…} | Explicit quantifier notation. |
| {n} | Repeat n times. |
| {n,m} | Repeat at least n, but no more than m times. |
| {n,} | Repeat at least n times. |
| (…) | Explicit set of characters to match. |
| * | Repeat any number of times. |
| + | Repeat one or more times. |
| ? | Repeat zero or one time |
| \ | Preceding "\" makes all the metacharacter as a literal instead of a special character. |





[...] Matching text with Special meta-characters using Regular Expressions [...]