Regex Tester

Test JavaScript regular expressions with flags, highlights, capture groups, and replacement output.

Matches

4

Groups

8

Flags

gm

Pattern

Flags

Results

Regex compiled

4 matches found.

/\b(?<tool>RavensMove|JSON Formatter|Regex Tester)\b/gm

Highlight

RavensMove ships a JSON Formatter and a Regex Tester. Use the Regex Tester to check groups, match indexes, and replacement output.

Matches

# Index Match and groups
1 0

RavensMove

1: RavensMovetool: RavensMove
2 19

JSON Formatter

1: JSON Formattertool: JSON Formatter
3 40

Regex Tester

1: Regex Testertool: Regex Tester
4 62

Regex Tester

1: Regex Testertool: Regex Tester

Replacement Preview

[RavensMove] ships a [JSON Formatter] and a [Regex Tester].
Use the [Regex Tester] to check groups, match indexes, and replacement output.

What is a Regex Tester?

A regex tester runs a regular expression against sample text and shows where the expression matches. It is useful for checking validation rules, parsers, search filters, log patterns, and text cleanup rules before moving the pattern into code.

This tester uses the JavaScript regular expression engine in your browser. Enter the pattern without surrounding slash delimiters, choose the flags you need, and inspect matches, indexes, capture groups, named groups, and replacement output.

JavaScript Regex Flags

  • g finds every match instead of stopping after the first match.
  • i ignores letter case.
  • m lets ^ and $ match line starts and line ends.
  • s lets . match newline characters.
  • u enables Unicode-aware matching.
  • y matches from the regex engine’s current sticky position.

Regex Tester Use Cases

  • Validate emails, slugs, IDs, dates, or log fragments.
  • Extract capture groups from text before writing parser code.
  • Preview a replacement string before using String.prototype.replace.
  • Compare case-sensitive and case-insensitive matches.

For adjacent developer data work, use the JSON Formatter to validate and inspect API payloads.

If you need to encode or decode text values before matching them, use the Base64 Encoder Decoder.

Frequently Asked Questions

What is a regex tester?
A regex tester runs a regular expression against sample text so you can inspect matches, indexes, and capture groups.
Which regex flavor does this tool use?
This tool uses the JavaScript RegExp engine available in your browser, including common flags such as g, i, m, s, u, and y.
Does the regex tester upload my text?
No, pattern testing, match highlighting, group extraction, and replacement preview run locally in your browser.

Related Tools