Regex Tester
Test a regular expression against sample text and see matches highlighted instantly.
/
/
Free to useNo software to install — works in any modern browser.
No signup neededOpen the tool and start straight away.
Runs in your browserNothing you enter is sent to a server.
Works on mobileSame tool on your phone, tablet or desktop.
How it works
- Enter — type or paste your values or text.
- Get the result — it is worked out in your browser.
- Adjust — change the inputs to compare, or copy the result.
Related tools
View allPrefer to just describe the task? The AI Assistant can convert, compress and resize files from a short instruction.
About Regex Tester
Test regular expressions against your own text and see the matches straight away. Everything runs in your browser, so the text you paste isn't sent anywhere.
What a regular expression is
A regex is a pattern for finding text. \d+ matches one or more digits, so it finds 41 and 2026 in "week 41 of 2026". [A-Z] matches one capital letter, and ^ and $ mark the start and end of a line.
Flags
The g flag finds every match instead of only the first. i ignores upper and lower case. m makes ^ and $ work on each line rather than the whole text.
Greedy vs lazy
By default, quantifiers like * and + are greedy: in "<b>one</b><b>two</b>", the pattern <b>.*</b> matches everything from the first <b> to the last </b>. Adding a question mark makes it lazy — <b>.*?</b> stops at the first closing tag, giving two separate matches.
Escaping
Characters such as . * + ? ( ) [ ] { } | \ ^ $ have special meanings. To match a real full stop, write \. — an unescaped . matches any character, a common reason a pattern matches far more than intended.
Flavours
Regex syntax differs slightly between languages. A browser tester uses JavaScript's engine, which is close to most others, but features like lookbehind or named groups can behave differently in PHP, Python or a database. Test in the language you'll use before relying on a complex pattern.
To check email addresses specifically, the Email Validator is simpler than writing your own pattern.
What a regular expression is
A regex is a pattern for finding text. \d+ matches one or more digits, so it finds 41 and 2026 in "week 41 of 2026". [A-Z] matches one capital letter, and ^ and $ mark the start and end of a line.
Flags
The g flag finds every match instead of only the first. i ignores upper and lower case. m makes ^ and $ work on each line rather than the whole text.
Greedy vs lazy
By default, quantifiers like * and + are greedy: in "<b>one</b><b>two</b>", the pattern <b>.*</b> matches everything from the first <b> to the last </b>. Adding a question mark makes it lazy — <b>.*?</b> stops at the first closing tag, giving two separate matches.
Escaping
Characters such as . * + ? ( ) [ ] { } | \ ^ $ have special meanings. To match a real full stop, write \. — an unescaped . matches any character, a common reason a pattern matches far more than intended.
Flavours
Regex syntax differs slightly between languages. A browser tester uses JavaScript's engine, which is close to most others, but features like lookbehind or named groups can behave differently in PHP, Python or a database. Test in the language you'll use before relying on a complex pattern.
To check email addresses specifically, the Email Validator is simpler than writing your own pattern.
Rate this tool
Log in to leave a review.