CodeLiveStudio

Regex Tester: Test Regular Expressions Online

Quick answer

Type a pattern, paste your text, and see every match highlighted live with capture groups listed underneath. This free regex tester uses JavaScript's own RegExp engine in your browser, no signup, no upload, and a one-click library of common patterns for email, URLs and more.

Last updated: November 12, 2026

The CodeLive regex tester highlights live matches as you type, shows numbered and named capture groups, and previews replacements before you apply them. Flags g, i, m, s and u are supported, with a pattern library for email, URLs, dates and numbers. Everything runs in your browser, so test strings are never uploaded. No signup. Use it to debug a pattern, test a validation rule, or learn regular expressions with instant feedback. The regex cheat sheet and the common-patterns library explain the syntax with runnable examples; this tester is where a pattern finally meets your own text. A concrete run: paste a server log, build a pattern for ISO timestamps, and watch each capture group light up before you commit the replacement. Start with the email or date pattern from the library, tweak it, and the match list updates on every keystroke, so a broken pattern never gets pasted into real code.

Use the tool below
0 matches
Loading editor…
Library:
Support requests came from: [addresses load here], [addresses load here] [addresses load here] Reach the team at [address] before Friday. Not an email: http://example.com/contact

Matching runs in your browser with JavaScript's own RegExp engine, nothing is sent anywhere. Pattern, flags and text auto-save locally.

Regex Tester runs entirely in your browser, nothing you paste or type is uploaded to any server, and no account is needed.

Worked examples

Real input on the left, exactly what Regex Tester gives back on the right. Paste either side into the tool to re-create it.

1Extract IP addresses from a server log

Type the pattern, paste the text, and every match is highlighted in place with its position — no Run button, results update as you type.

Input · pattern + test text
Pattern:  \b(?:\d{1,3}\.){3}\d{1,3}\b

203.0.113.42 - GET /health 200
198.51.100.7 - POST /api/login 401
Output · matches
match 1:  203.0.113.42    (line 1, columns 1–12)
match 2:  198.51.100.7    (line 2, columns 1–12)

Matches are highlighted inside the text itself; the list view adds positions so you can feed them into code. The (?:…) non-capturing group keeps the repetition tidy without adding capture numbers you do not need.

2Rearrange dates with a replace preview

Switch to the replace view to see what a substitution would do before you commit it anywhere. Capture groups become $1, $2, $3.

Input · pattern + replace + text
Pattern:  (\d{4})-(\d{2})-(\d{2})
Replace:  $3/$2/$1

Released 2026-03-14, hotfixed 2026-03-15.
Output · replaced text
Released 14/03/2026, hotfixed 15/03/2026.

The replaced view shows the result with the substitutions highlighted, so a wrong group number is obvious before you copy the pattern into your editor.

How do I test a regular expression online?

  1. 1

    Type your pattern between the slashes, or click a library chip (Email, URL, IPv4…) to start from a known-good example.

  2. 2

    Toggle the flags you need: g for all matches, i for case-insensitivity, m for line anchors, s for dot-matches-newline, u for unicode.

  3. 3

    Paste or type the test text and watch matches highlight instantly; the list below shows each match's position and capture groups.

  4. 4

    Open the Replaced tab to preview substitutions using $&, $1 or $<name> references, then copy the result or the match list.

What this regex tester gives you

Live match highlighting

Every match is marked in the text the moment the pattern or the text changes, no run button. Zero-length matches, overlaps and multiline input are all handled by JavaScript's real engine, not a simulation.

Capture groups made visible

Numbered groups and named groups (?<name>…) are listed under each match, so you can verify exactly what your pattern extracts before wiring it into code, the difference between a regex that looks right and one that is right.

Real replace preview

The Replaced tab applies your substitution string with full backreference support ($&, $1, $<name>) and shows the resulting text. It is the fastest way to build a find-and-replace you can trust.

Pattern library for common jobs

One click loads tested patterns for emails, URLs, IPv4 addresses, hex colors, ISO dates, US phone numbers, HTML tags, duplicate words and strong-password rules, each with sensible flags.

Private: your text never leaves the tab

Log files, user data and internal payloads are exactly the things you should not paste into random websites. Matching runs in your browser via RegExp; there is no server to receive your data and no account to create.

Auto-saved between visits

Pattern, flags, text and replacement are kept in your browser's localStorage, so an unfinished pattern is waiting when you come back, stored on your device, not in someone's cloud.

CodeLive Studio vs Regex101 vs Regexr

The three browser tools people usually compare for regex work, scored on everyday usage. Honest verdict up front: Regex101's explanation pane is the best regex teacher on the web; this tester's edge is speed and the shared no-signup, no-upload model.

What mattersCodeLive StudioRegex101Regexr
PriceFree, no paid tier existsFree; ads + donationsFree; ads
Account requiredNeverOptional (to save/share)Optional (to save)
Test text stays in your browserYes, matched client-side onlySaved server-side if you share/linkSaved server-side if you save
Live match highlightingYesYesYes
Capture group breakdownYes, numbered + namedYes, plus per-match detailYes
Replace previewYesYesYes
Pattern explanation paneNo, compact by designYes, its standout featureBasic
Community pattern libraryBuilt-in starter setLarge, community-contributedMedium
Works offline after loadYesNoNo

Based on publicly available information as of October 2026, features change, so check each tool for specifics. Fair trade-off: if you are learning regex from scratch, Regex101's explanation pane is worth the ads. If you already know what you are doing and just need fast, private testing, this page is deliberately minimal.

Which regex flavor am I testing here?

This tester uses JavaScript's RegExp engine, the flavor that runs in every browser and in Node.js. That is the right choice for frontend validation, Node scripts, and most tooling, but it differs subtly from PCRE (PHP, Python with the regex module), POSIX and .NET flavors: lookbehind support, named-group syntax (?<name>…) and unicode properties (\p{L} with the u flag) all behave slightly differently.

If your production target is another language, treat this tool as a scratchpad for structure and re-verify edge cases in that language. The overwhelming majority of patterns, character classes, quantifiers, anchors, groups, behave identically everywhere; the differences live at the exotic edges.

Questions this tool answers

Frequently asked questions

Is this regex tester free?

Yes, all features including the replace preview, the pattern library and the match list export are free with no account and no limits. There is no paid tier because the tool has no server-side costs: your browser does all the work.

Is it safe to paste log files or user data?

As safe as pasting into a local editor. Matching happens in your browser with JavaScript's RegExp, the text is never sent anywhere, and there is no server on this page that could receive it. Only a local auto-save copy lives in your browser's storage.

Why does my pattern show as invalid?

The message under the pattern box is the engine's own error, most often an unbalanced parenthesis, an unescaped special character (., *, ?, [, ]) or a lookbehind your browser does not support. Fix the position it mentions and the highlights return instantly.

What is the difference between the g flag on and off?

Without g, the engine stops after the first match; with g it finds every match in the text. The highlighter and the match list respect this exactly like real code does, a common bug source, which is why the flag toggle is right next to the pattern.

Can I test lookaheads and lookbehinds?

Yes: JavaScript supports both. Lookbehind ((?<=…) and (?<!…)) needs a modern browser; if it is unsupported you will get a clear engine error rather than a wrong result.

How do I reference groups in the replacement string?

Use $& for the whole match, $1 through $9 for numbered groups, and $<name> for named groups. The Replaced tab shows the exact output before you copy it.