Regex Tester Online

Validate and debug regular expression patterns against sample text directly in your browser. See match results, capture groups and match positions instantly without switching between a code editor and online reference.

Enter your regex pattern and test string

Type your regular expression pattern in the input field and provide sample text in the test string area. Set flags like g for global, m for multiline and i for case-insensitive matching.

Inspect match results and positions

Each match shows the matched text, its character position index in the test string and any captured groups from parenthesized subexpressions.

Debug complex patterns incrementally

Start with a simple pattern and build up complexity. The tester shows exactly which parts of your text are matched, helping you refine lookaheads, character classes and alternations.

Understand JavaScript regex engine behavior

This tool uses the native JavaScript RegExp engine. Behavior may differ from PCRE, Python or Java regex flavors for features like lookbehinds and Unicode property escapes.

Technical references: JavaScript RegExp

Regex Tester FAQs

The JavaScript RegExp engine built into your browser. It supports features available in your browser version including Unicode property escapes.
Yes. Add the m flag to make ^ and $ match at line boundaries rather than only at the start and end of the entire string.
Parenthesized parts of a pattern like (\w+) capture matched text into numbered groups, shown in the results.
No. The pattern is compiled as a RegExp object only. No eval or code execution occurs.
The tester reports up to 500 matches to prevent infinite loops with patterns that match empty strings.
Yes, if your browser supports them. Most modern browsers support positive and negative lookahead and lookbehind assertions.
No. All regex compilation and testing runs entirely in your browser.
Use the s (dotAll) flag to make the dot character match newline characters, or use [\s\S] as a universal character class.
Yes. Paste any email regex pattern and test it against valid and invalid email addresses in the test string area.