
DEV · REGEX
Regex Tester
Enter a pattern and flags to see matches live.
- 1.Enter a regular expression pattern
- 2.Enter flags (g, i, m, etc.) if needed
- 3.Type or paste the test text to check
- 4.The match count and positions appear automatically on the right
→ Output: A list of matches and their positions found in the test text
Enter a pattern and text to see results.
About this tool
Type a regular expression and see live which parts of your text it matches. Tweaking the pattern and watching the result shift is far faster than matching it in your head.
When to use it
- —Refining a pattern that picks only certain error lines out of a log
- —Testing an input-validation rule against real examples
- —Working out what somebody else's regex actually captures by feeding it samples
Good to know
- —It follows JavaScript regex rules; some Python or PCRE syntax will not behave the same.
- —Nested quantifiers like `(a+)+` can explode in cost on certain inputs and make the browser appear frozen.
- —Some scripts compose a single visible character from several code points, so matching at that level can behave unexpectedly.