Regex tester
Test a JavaScript regular expression in your browser: see matches highlighted and capture groups in a table.
The pattern and text you type never leave this device.
How to use it
- 1
Type the pattern
Write the pattern in the pattern box without the slashes. Pattern: a JavaScript regular expression. Other flavors, such as PCRE or Python, can behave differently.
- 2
Set the flags
Enter flag letters such as g, i, m, s, u, or y in the flags box.
- 3
Paste the text
Put the text to search in the text box. Matches are highlighted as soon as you change the pattern, flags, or text.
- 4
Read the groups
The group table lists each match with its numbered and named capture groups, so you can check what each part caught.