diff --git a/README.md b/README.md index 79c983e..a1d3760 100644 --- a/README.md +++ b/README.md @@ -19,15 +19,23 @@ contains uppercase letter and also it is too short. ## Table of Contents -1. [Basic Matchers]() -2. [Meta character]() -3. [Quantifiers]() -4. [OR operator]() -5. [Character Sets]() -6. [Shorthand Character Sets]() -7. [Grouping]() -8. [Lookaheads]() -9. [Flags]() +- [Basic Matchers]() +- [Meta character]() + - [Full stop]() + - [Character set]() + - [Negated character set]() + - [Repetitions]() + - [The Star]() + - [The Plus]() + - [The Question Mark]() + - [Character Group]() +- [Quantifiers]() +- [OR operator]() +- [Character Sets]() +- [Shorthand Character Sets]() +- [Grouping]() +- [Lookaheads]() +- [Flags]() ## 1. Basic Matchers @@ -169,4 +177,16 @@ the comma the regular expression `[0-9]{2}` means: Match exactly 2 digits.
 "[0-9]{2}" => The number was 9.9997 but we rounded it off to 10.0.
+
+ +## 2.4 Character Group + +Character group is a group of sub-pattern that is written inside Parentheses `(...)`. As we discussed before that in regular expression +if we put quantifier after character than it will repeats the preceding character. But if we put quantifier after a character group than +it repeats the whole character group. For example the regular expression `(ab)*` matches zero or more repetitions of the character "ab". +We can also use the alternation inside character group. For example the regular expression `(c|g|p)ar` means: lowercase character `c`, +`g` or `p`, followed by character `a`, followed by character `r`. + +
+"(c|g|p)ar" => The car is parked in the garage.
 
\ No newline at end of file