Test and debug regular expressions with highlighting and matching details.
Regular expressions (Regex) are powerful sequences of characters that define search patterns. They are used for string matching, search-and-replace operations, and data validation across almost all programming languages.
| Token | Description |
|---|---|
. | Matches any character except line breaks. |
\d | Matches any digit (0-9). |
\w | Matches any word character (alphanumeric + underscore). |
[abc] | Matches any character in the set. |
+ | Matches 1 or more of the preceding token. |
* | Matches 0 or more of the preceding token. |
^ | Matches the start of the string. |
$ | Matches the end of the string. |
Use the g (global) flag if you want to find all matches in the text, otherwise it will only return the first match.