mirror of
https://github.com/ziishaned/learn-regex.git
synced 2025-09-29 23:30:32 -04:00
fix typo
This commit is contained in:
parent
572c456c7f
commit
8f6bfb6db4
@ -197,7 +197,7 @@ the comma the regular expression `[0-9]{2}` means: Match exactly 2 digits.
|
|||||||
## 2.5 Character Group
|
## 2.5 Character Group
|
||||||
|
|
||||||
Character group is a group of sub-pattern that is written inside Parentheses `(...)`. As we discussed before that in regular expression
|
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
|
if we put quantifier after character then it will repeat 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".
|
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 `|` meta character inside character group. For example the regular expression `(c|g|p)ar` means: lowercase character `c`,
|
We can also use the alternation `|` meta character 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`.
|
`g` or `p`, followed by character `a`, followed by character `r`.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user