Regex Tester
Test regular expressions against text and see every match, locally in your browser.
Flags:
What does this tool do?
A regular expression (regex) is a pattern for matching text. This tool evaluates a pattern against your text and lists every match, using the same regex engine as JavaScript — so what you see here is what you get in the browser or Node.js.
What you get
- Every match, not just the first. The global flag is applied for you, so the list shows all occurrences in the text.
- Whole matches only. Capture groups are not listed:
(\w+)@(\w+)returnsana@example.com, not the separateanaandexample.com. To inspect groups, run the same pattern in your own code. - Flags:
i(ignore case),m(multiline^and$),s(.matches newlines) andu(Unicode).
Keep in mind
Different languages have slightly different regex flavors. Results here reflect the JavaScript (ECMAScript) engine, which covers the vast majority of day-to-day patterns.
Matching happens as you type, so a pattern with catastrophic backtracking — ^(a+)+$ is the classic
example — can freeze the tab on the wrong input. If the page stops responding, clear the pattern
field and simplify the expression.