RegEx Syntax
Regular expressions follow a specific syntax:
- In standard notation:
/pattern/ - In Python:
r"pattern"
When a pattern is applied to text, it returns the range where the pattern exists in the string.
Literals or Simple Characters
Simple literals match the exact characters in the pattern.
Example:
/cat/matches the string "cat" within text