diff --git a/README.md b/README.md index f22cfd3..c4c4d89 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,22 @@ The regular expression `123` matches the string "123". The regular expression is # 2. Meta Characters -Meta characters are the building blocks of the regular expressions. Some meta characters have a special meaning that are written inside the square brackets. +Meta characters are the building blocks of the regular expressions. Some meta characters have a special meaning that are written inside the square brackets. The meta character are as follows: + +|Meta character|Description| +|:----:|----| +|**.**|Period matches any single character except a line break.| +|**[ ]**|Character class. Matches any character contained between the square brackets.| +|**[^ ]**|Negated character class. Matches any character that is not contained between the square brackets| +|*****|Matches 0 or more repetitions of the preceding symbol.| +|**+**|Matches 1 or more repetitions of the preceding symbol. +|**?**|Makes the preceding symbol optional.| +|**{n}**|Braces. Matches ā€œnā€ repetitions of the preceding symbol.| +|**(xyz)**|Character group. Matches the characters xyz in that exact order.| +|**|**|Alternation. Matches either the characters before or the characters after the symbol.| +|**\**|Escapes the next character. This allows you to match reserved characters `[ ] ( ) { } . * + ? ^ $ \ |`| +|**^**|Matches the beginning of the input.| +|**$**|Matches the end of the input.| # 2.1 Full stop