Regex Tester
Test a regular expression against text and inspect every match.
Matches (0)
Enter a pattern to see matches.
FAQs on Regex Tester
What is a Regex Tester?
A Regex Tester is an online tool that allows you to write, test, and validate regular expression patterns against sample text. It helps developers identify matches, inspect captured groups, and debug regular expressions.
How do I test a regular expression online?
Enter your regular expression pattern, provide the test text, and select the required regex flags. The tester evaluates the pattern against your text and highlights matching sections, along with captured groups when available.
Which regular expression flags are supported?
This Regex Tester supports global (g), case-insensitive (i), and multiline (m) flags. Patterns use JavaScript regular expression syntax.
What is the difference between global, case-insensitive, and multiline flags?
The global (g) flag finds all matches instead of stopping at the first match. The case-insensitive (i) flag makes matching ignore letter case. The multiline (m) flag changes how the start (^) and end ($) anchors behave, allowing them to match individual lines.
Can I inspect captured groups in a regex pattern?
Yes. The tester displays numbered and named captured groups for each match when your regular expression defines capturing groups. This helps you understand which parts of the input text were captured.
What is the difference between capturing and non-capturing groups?
Capturing groups use parentheses () to extract matching portions of text for later inspection. Non-capturing groups use (?:) to group parts of a pattern without creating a separate captured result.
Does this Regex Tester support JavaScript regular expressions?
Yes. This tool uses JavaScript regular expression syntax and the built-in JavaScript RegExp engine. Some regex features available in other programming languages may not be supported.
Why is my regular expression showing a syntax error?
A regex syntax error can occur when parentheses, brackets, or braces are unmatched, escape characters are incorrect, or the pattern uses unsupported syntax. Check the pattern and flags to identify and correct the issue.
Is my test text or regex pattern uploaded to a server?
No. Regular expression testing happens directly in your browser. Your regex patterns and test text are not transmitted to or stored on our servers.