Regex Tester
Test and debug regular expressions with live match highlighting
Capture Groups
About This Calculator
Regular expressions (regex) are patterns used to match, search, and manipulate strings in programming. This tester provides a real-time environment to write, test, and debug JavaScript regex patterns against sample text. It highlights all matches directly in your test string, displays capture group contents, and lets you toggle regex flags including global (g), case-insensitive (i), and multiline (m). As you type your pattern and test text, matches update live so you can iterate quickly. Regex is essential for form validation, log parsing, data extraction, search-and-replace operations, and text processing. This tool uses JavaScript regex syntax, so your patterns will behave exactly as they would in a JavaScript application.
How to Use
- 1Enter a regex patternType your JavaScript regular expression and toggle flags (global, case-insensitive, multiline).
- 2Provide test textEnter sample text to match against your pattern.
- 3Review matchesSee highlighted matches and capture group contents in real time.
Frequently Asked Questions
Q. What regex flavor does this tool use?
Q. How do capture groups work in regex?
Q. What are the available regex flags?
Disclaimer: Results are for informational purposes only and do not constitute professional advice. Always consult qualified professionals for important decisions.