⌕ Test & Debug

Regex Tester & Builder

Live regex testing with match highlighting, capture groups and flag controls, plus a .NET compatibility checker.

Updated

Live matching Group capture .NET compatibility check All JS flags

Loading Regex Tester…

What this page sends

  • Your input: Processed in this tab and not sent to a server.
  • Page load: Loading the page requests HTML, scripts and images from ByteKiln, fonts from Google Fonts, and sends Google Analytics page views, tool-usage events and catalog interactions (tool/category IDs, result status and whether a click followed search — never your input, output or search terms). Privacy & sharing

How the Regex Tester & Builder Works

The ByteKiln Regex Tester runs your pattern against the test string using the browser's native JavaScript RegExp engine. Results update live as you type.

Match highlighting

Every match is highlighted in the preview panel. Non-matching text is shown in muted colour so the matched regions stand out at a glance.

Capture groups

Each result card shows the full match, its index position in the string, and the value of each capture group. Named groups ((?<name>…)) are shown with their label.

.NET compatibility checker

A small tokenizer reads the pattern, with escapes and character classes respected so \( and [(?<=] are not misread, and flags constructs that are .NET only, JavaScript only, unsupported by both, or that behave differently. Examples are variable-length lookbehind, balancing groups, Unicode \d, $ before a final newline, and group numbering. It checks RegexOptions combinations: ECMAScript is only legal with IgnoreCase, Multiline and Compiled. It also previews a replacement using .NET's $1 / ${name} rules.

Quick examples

The toolbar includes ready-made patterns for email addresses, URLs, IPv4 addresses, ISO dates, and hex colours — click any to load it immediately.

Limitations

  • Patterns run in your browser's JavaScript RegExp engine. The .NET checker reads the pattern and flags differences; it doesn't execute .NET's engine, so RightToLeft, balancing groups and atomic groups are explained, not run.
  • Matching runs on the page's main thread; a catastrophically backtracking pattern can freeze the tab until the browser stops it.
  • Results are capped at 10,000 matches, and zero-length matches advance one character at a time as in String.prototype.matchAll.
  • The replace preview applies .NET substitution rules to the JavaScript matches, so it is exact only when the pattern matches the same way in both engines.

FAQ

Short answers for the things developers usually ask before trusting a tool.

What regex flavour does this use?

The Regex Tester uses the browser's native JavaScript RegExp engine. This means it supports all standard ES2024 features including named capture groups, lookbehind assertions, and the /v (Unicode sets) flag.

What do the flag buttons do?

The flags control how matching works: g (global) finds all matches instead of just the first, i (case-insensitive) ignores letter case, m (multiline) makes ^ and $ match line boundaries, s (dotAll) makes . match newlines, and u enables full Unicode mode.

Will my regex work the same in C# / .NET?

Often, but not always. .NET supports things JavaScript doesn't, such as atomic groups, balancing groups, (?'name') and \A or \z. It numbers unnamed groups before named ones. Its \d and \w match Unicode digits and letters unless you set RegexOptions.ECMAScript, and its $ also matches before a final newline. Replacements use $1 and ${name}, not \1 or $<name>. The .NET compatibility panel flags each of these in your pattern and gives the C# line to paste.

How do I see capture group results?

Each match card in the results panel shows numbered capture groups (Group 1, Group 2…) and named groups in quotes. Named groups use the (?<name>…) syntax.

Is my test input sent to a server?

No. Matching runs in the page with JavaScript's native RegExp engine; the pattern and test string are not sent to a server.

Why does the tester show zero matches even though I think the pattern is correct?

The most common cause is a missing g flag — without it, only the first match is found. Also check that backslashes are properly escaped: in the pattern field, \d means a digit, but if you type literally \d you may need to check the input. The error message beneath the pattern field pinpoints invalid syntax.

Related tools

Useful follow-ups when one conversion usually turns into three more.

Want the background and worked examples? There's a longer write-up.

Read the Regex Tester guide