Free tool. No sign-up.
Regex Tester
Test JavaScript regular expressions live against your own text. Matches highlight instantly, flags toggle with checkboxes, and capture groups are listed below.
What the tool does
Type a pattern and it is tested against your text as you type, using the JavaScript regex engine. Matches are highlighted, the count is shown, and capture groups are listed. Toggle flags with the checkboxes: g for all matches, i to ignore case, m for multiline ^$, s so dot matches newlines, u for Unicode mode.
Worked example
The sample pattern \b[A-Z][a-z]+\b finds capitalized words. Against "Ada and Grace wrote code in 1843." it matches Ada and Grace: 2 matches.
Cheat notes
\d digits, \w word characters, \s whitespace, . any character, * zero or more, + one or more, ? optional, ( ) capture group, [abc] character set, ^ start, $ end.
Planning estimate only. Results use the list prices shown and may differ from your actual bill. Terms
Frequently asked questions
Which regex flavor is this?
JavaScript. Patterns behave like new RegExp(pattern, flags) in the browser, which covers the vast majority of web use cases.
Why is my pattern invalid?
Common causes: unbalanced parentheses or brackets, a trailing backslash, or an invalid flag. The error message names the problem.
What are capture groups?
Parts of the pattern in parentheses. Each match reports what each group captured, which is how you extract pieces like the area code from a phone number.
Is my text sent to a server?
No. Testing happens locally in your browser, so proprietary log data or code samples never leave your device.