← Tornar a les funcions
Free

Regex Tester

Regex Tester evaluates regular expressions against test text in real time. Matches are highlighted with alternating colors, capture groups and named groups are broken out per match, and all standard flags (g, i, m, s, u, y) are supported. A replace mode shows how substitutions transform the text.

Regular expressions are the universal text-pattern language, but getting them right takes iteration. Regex Tester makes that iteration instant. Type a pattern and see matches highlight in the test text as you type. Each match card shows the matched substring, its index, and every capture group ($1, $2, ...) and named group ((?<name>...)) individually — no more guessing whether your groups captured what you expected. All six JavaScript regex flags are supported via both a compact flag input (gi, gim) and a friendlier checkbox row. The replace mode runs String.replace with your pattern and replacement string — supports $& (whole match), $1..$9 (groups), and named backrefs. Everything runs locally so input stays on your machine.

Vista prèvia en viu
example.com
Regex Tester 3 matches found
Pattern
/ \b\w+@\w+\.\w+\b / gi
g global i ignore case m multiline s dotAll
Test Text · Matches highlighted
Send emails to [email protected] or [email protected] for support.
Also contact [email protected] for billing questions.
Match Details
Funcions clau

Live Match Highlighting

Matches highlight alternating purple and green colors as you type — see exactly what the regex captures without running the script.

Per-Match Details

Each match shows its index in the source, matched substring, and every capture group ($1, $2, ...) and named group with value.

All JavaScript Flags

Supports g (global), i (ignore case), m (multiline), s (dotAll), u (unicode), y (sticky). Toggle via compact input or checkbox row.

Replace Preview

Enter a replacement string with $&, $1..$9, or $<name> backrefs. Click Replace to transform the test text instantly.

Fast Iteration

Output updates live on every keystroke. No Run button — tune your pattern until matches look right.

Error Surfacing

Invalid regex syntax is reported with the exact error message from the JavaScript engine so you can fix syntax fast.

Casos d'ús comuns

Validating User Input

Build a regex for emails, phone numbers, or ZIP codes, then test against edge cases before shipping to production code.

Log & Text Parsing

Extract structured fields (timestamps, IDs, IPs) from log lines by iterating on a regex until every expected format matches.

Search-and-Replace Refactors

Verify a find/replace regex works safely on real code or text before running it over hundreds of files.

Learning Regex

Experiment with features like lookahead, lookbehind, non-capturing groups, or Unicode property escapes in a safe, visual sandbox.

Debugging a Regex That Doesn't Work

Paste the regex from your code, the input that should have matched, and see exactly where the regex fails — no more guessing.

Com utilitzar-lo
1

Open Regex Tester

Click the Regex icon in the DevSuite Pro dock. A panel opens with pattern, flags, test text, and replacement fields.

2

Enter a Pattern

Type your regex between the slashes. Flags can be typed directly (gi) or toggled with checkboxes below.

3

Paste Test Text

Paste the text to search in the Test Text area. Matches highlight instantly.

4

Review Capture Groups

The Match Details list below shows every match's index and captured groups. Confirm your groups capture what you expect.

5

Try Replace (optional)

Enter a replacement string with $1, $&, or $<name> backrefs. Click Replace to transform the text in place.

Llest per provar-ho? Regex Tester?

Instal·la DevSuite Pro gratuïtament i desbloqueja més de 39 eines de desenvolupador per al teu navegador.

Afegeix a Chrome Afegeix a Edge Afegeix a FireFox