Name | Matches? |
harini | ✅ Yes |
henri | ❌ No |
Symbol | Description | Example |
. | Matches any character except newline | h.llo → matches hello |
^ | Matches the start of the string | ^hello → matches strings starting with hello |
$ | Matches the end of the string | world$ → matches strings ending with world |
* | Matches 0 or more repetitions of the preceding character | a* → matches aaa |
+ | Matches 1 or more repetitions | a+ → matches aaa |
[] | Matches any character inside the brackets | [abc] → matches a, b, or c |
Sequence | Description | Example |
\d | Matches any digit (0-9) | \d+ → matches 123 |
\w | Matches any word character (alphanumeric + _) | \w+ → matches hello123 |
\s | Matches any whitespace character | \s → matches spaces or tabs |
\b | Matches word boundaries | \bword\b → matches word |