Regex Tester
Test regular expressions against sample text instantly in your browser, with live-highlighted matches.
Enter a pattern to test it against the string below.
How to use this tool
Enter a pattern and choose which flags to apply, then paste or type a test string. Matches are highlighted in the test string as you type, with a breakdown of each match's position and capture groups below. Invalid patterns show a clear error message.
FAQ
Is this regex tester free to use?
Yes, this tool is completely free to use with no limits on how often you can use it.
Does my pattern or test string get uploaded anywhere?
No. Matching happens directly in your browser using JavaScript's built-in regular expression engine. Nothing is sent to a server.
What do the g, i, m, and s flags do?
g finds all matches instead of just the first. i makes matching case-insensitive. m makes ^ and $ match the start/end of each line instead of the whole string. s ("dotall") makes . also match newline characters.
Related Tools
JSON to Python Converter
Generate Python dataclasses from a JSON sample, with types inferred automatically.
Cron Expression Parser
Explain a cron expression in plain English and see its next 5 run times.
JSON to TypeScript Converter
Generate TypeScript interfaces from a JSON sample, with types inferred automatically.
cURL to Python/JavaScript Converter
Convert a cURL command into equivalent Python (requests) or JavaScript (fetch) code.