Regex Tester
Test regular expressions with real-time matching
Options
Results
About Regex Tester
Test regular expressions against input text with real-time match highlighting. View capture groups, named groups, and match positions. Common pattern library included.
How It Works
Compiles the pattern into a JavaScript RegExp object with the specified flags, then applies the selected action (match, matchAll, replace, or split) to the input text.
Step by Step
- 1 Enter a regex pattern in the Pattern field
- 2 Set flags (g for global, i for case-insensitive, m for multiline)
- 3 Choose an action: Match, Match All, Replace, or Split
- 4 Enter test text in the input area
- 5 Click Test to see results
Tips
- Use the 'g' flag with Match All to find every occurrence
- The 'm' flag makes ^ and $ match line boundaries, not just string boundaries
- For Replace, enter the replacement string in the Replacement field