Pattern Matching Using Quantifiers
We'll cover the following...
We'll cover the following...
Matching specific characters
We use [] square brackets for matching specific characters using regular expressions. We use brackets to find a set of characters. See examples below:
- [ABC]: Character class representing either- A,- B, or- C.
- [^ABC]: Character class with negation, any character other than- A,- B, or- C.
- [0-9]: Any numeric character, either of- 0,- 1,- 2…- 8, or- 9.
- [^0-9]: Any character other than- 0,- 1,- 2…- 8, or- 9.
Quantifiers
We can use quantifiers to capture group patterns. Below are the ...