Regular Expression Instruction Set
- All the alphanumerics plus some punctuations are Instructions sets.
- They would tell Regex engine to Match
- Metasyntax: Is a special syntax given to characters and these characters have a special meaning depending on dialect you choose
* \ ^ $ . [ ( ) | + ? {
-
Alternation: This is how we specify the alternative paths generally represented by |
-
Ranges: Ranges specify the range characters
-
Escape Sequence: To Match the character which is in metacharacter list just add a backslash
-
Character Classes:
- Word = \w
- Not Word = \W
- digit = \d
- whitespace = \s
-
Greedy and Non Greedy Regular expressions
Next Steps
- What is a Capture Group?
- How to use regex in grep & sed
