Literals and anchors
Regular expressions are built from literals, operators, and special symbols. A literal matches itself, so the pattern cat looks for the exact word "cat" in the text. Operators such as *, +, and ? change how often a token can appear. Character classes like [abc] match one character from a set, while anchors such as ^ and $ tie the match to the start or end of a line or string.
Escaping special characters
Escaping is one of the most important concepts to understand. Some symbols have special meaning in regex, so you need a backslash when you want them to act like ordinary characters. For example, a dot usually means "any character," but \. means a literal dot. The same idea applies to parentheses, brackets, plus signs, and other metacharacters.
Grouping and capture
Grouping is another core idea. Parentheses let you bundle parts of a pattern together so you can repeat them, quantify them, or capture them for later use. For example, (\d{4})-(\d{2})-(\d{2}) can break a date into year, month, and day. In the tester, those groups are easy to inspect because the result table shows them separately.
Quantifiers and greediness
Quantifiers control repetition. A pattern like a{2,4} matches two to four a characters, while \w+ matches one or more word characters. Greedy quantifiers try to match as much as possible, while some patterns can be made lazy by adding a question mark.