Regex Tester

Test regular expressions with live highlighting and match groups, get any pattern explained in plain English, and browse a cheatsheet of common patterns. Everything runs in your browser.

No data leaves your browser
Pattern
/
Test String
Common Patterns — click to use
Pattern to explain
/

Flags come from the Tester tab (g, i, m, s). Explanations follow the JavaScript regex syntax.

How to use the Regex Tester

  1. Type a regular expression and choose flags (g, i, m, s, u).
  2. Paste test text; matches and capture groups highlight live.
  3. Check the match list and group values.
  4. Use the cheat sheet tab for syntax reminders.

Why use this Regex Tester

  • Live JavaScript regular expression testing
  • Highlights every match and capture group
  • Flags for global, case-insensitive, multiline and dotAll
  • Built-in regex cheat sheet

A free RegExr alternative that explains your regex

If you are looking for a RegExr alternative, this tester runs entirely in your browser: no account, nothing uploaded, and it keeps working offline once loaded. Type a pattern and see matches highlighted live, with numbered and named capture groups listed for every match. Switch to the Explain tab to turn any pattern into plain English, piece by piece, with warnings for risky constructs.

What the explainer covers

Which regex flavor is this?

The tester uses your browser's JavaScript (ECMAScript) engine, which is the right choice for front-end code, Node.js and TypeScript. PCRE, Python and .NET also support constructs that JavaScript does not, such as possessive quantifiers, atomic groups and inline flags, so a pattern that relies on them will not run here.

Frequently Asked Questions

Is the regex tester free?

Yes, completely free with no account or signup required.

Which regex flavor is used?

JavaScript's built-in RegExp (ECMAScript standard) with flags: global (g), case-insensitive (i), multiline (m), and dotAll (s).

What features are included?

Live match highlighting, capture group extraction, match count, a regex cheat sheet, and one-click patterns for common use cases.

What is a regular expression?

A regular expression (regex) is a sequence of characters that defines a search pattern. It is used to find, match, validate, and transform text in programming languages, editors, and command-line tools.

How do I test a regex online?

Enter your pattern in the Pattern field and your test string in the Text field. Matches are highlighted in real time as you type.

What are regex flags?

Flags modify how the pattern matches. g (global) finds all matches instead of stopping at the first. i (case-insensitive) treats uppercase and lowercase as equal. m (multiline) makes ^ and $ match line starts/ends. s (dotAll) makes . match newlines.

What is the difference between greedy and lazy quantifiers?

Greedy quantifiers (*, +, {n,m}) match as much as possible. Lazy quantifiers (*?, +?, {n,m}?) match as little as possible. For example, <.+> greedily matches a whole string, while <.+?> lazily matches the shortest possible span.

What is a capture group?

A capture group is part of the pattern wrapped in parentheses (). The matched text is extracted separately. Named groups use (?<name>...) syntax.

How do I match an email address with regex?

A common email pattern is [a-z0-9._%+-]+@[a-z0-9.-]+.[a-z]{2,}. Click the Email pattern in the cheat sheet to use it instantly.

What is a lookahead in regex?

A lookahead asserts that a pattern must (or must not) follow the current position without consuming characters. (?=...) is a positive lookahead and (?!...) is a negative lookahead.

How do I match the start or end of a line?

Use ^ to match the start and $ to match the end. Enable the m flag to make ^ and $ match the start and end of each individual line rather than the whole string.

Is this a good RegExr alternative?

Brace's regex tester runs entirely in your browser with no sign-up: live match highlighting, capture and named groups, flags g, i, m and s, a cheatsheet of common patterns, shareable links, and an Explain tab that describes any pattern in plain English and warns about risky constructs such as catastrophic backtracking. It uses your browser's JavaScript (ECMAScript) regex engine, so features that exist only in PCRE, Python or .NET, such as possessive quantifiers and atomic groups, are not available.

How do I explain a regular expression in plain English?

Open the Explain tab, or click Explain in plain English under the pattern box. Each part of the pattern, such as groups, character classes, quantifiers, anchors and lookarounds, is listed with a short description and indented to show how groups nest. Warnings appear for common problems such as nested quantifiers and the [A-z] range mistake.

What is catastrophic backtracking?

Some patterns, such as (a+)+$, can take exponentially longer on certain inputs because the engine tries a huge number of ways to match, which can freeze a page or a server (ReDoS). Avoid nested quantifiers over the same characters, make alternatives mutually exclusive, and test with long non-matching strings. The Explain tab flags nested quantifiers.

More Developer Tools

JSON ToolsValidate, repair, compare & JSONPath JSON FormatterPretty-print and beautify JSON CSV Viewer & EditorView, edit and convert CSV files YAML ConverterConvert YAML to JSON and back Regex TesterTest regular expressions live Text DiffCompare two texts side by side JWT ToolDecode, encode, compare and verify JWTs JWT DecoderInspect JWT header and payload XML FormatterFormat, validate and convert XML URL EncoderEncode, decode and parse URLs Base64Encode and decode Base64 strings Hash GeneratorSHA-256, MD5, HMAC and CRC32 SHA-256Generate SHA-256 checksums MD5 GeneratorGenerate MD5 hash values Text ToolsCase convert, count and transform text Number ConverterBinary, hex and octal converter Token CalculatorEstimate LLM token counts from text PDF EditorEdit text, sign and annotate PDFs Schema GeneratorJSON to TypeScript, Go, Rust, Python IndexNowSubmit URLs to Bing, Yandex & more Index CheckerIs my page indexed on Google? PII RedactorMask personal data & keys before AI Timestamp ConverterUnix epoch to date and back UUID GeneratorUUID v4/v7, ULID, Nano ID Password GeneratorSecure passwords & passphrases MCP Config BuilderConfigs for Claude, Cursor, VS Code AGENTS.md GeneratorCLAUDE.md, Cursor rules, Copilot AI Skills Library200 SKILL.md files by industry AI Readiness Checkerllms.txt, AI bots, agent access Repo PackerCodebase to one LLM-ready file Skill Linter & ConverterValidate SKILL.md, convert AGENTS.md Prompt Injection ScannerHidden instructions in text & HTML AI Crawler Controlsrobots.txt for AI bots & llms.txt Cron ParserExplain crontab, next run times SQL FormatterBeautify & minify SQL queries cURL ConvertercURL to fetch, Python, Go, PHP Chat Export ConverterChatGPT/Claude export to Markdown Markdown PreviewLive GFM preview & to HTML Color & ContrastHEX/RGB/OKLCH, WCAG checker QR Code GeneratorURL, Wi-Fi, vCard; PNG & SVG Image EditorConvert, compress, resize & crop Tool Schema ConverterOpenAI ↔ Anthropic ↔ Gemini ↔ MCP JSONL ValidatorFine-tuning & batch files SSE Stream ParserReassemble LLM streaming responses Prompt Template & DiffFill {{vars}}, compare versions