Regex Tester

A regular expression (regex) is a pattern that describes text to search for. This tester uses your browser’s JavaScript engine so results match what you get in JS code.

How to use the Regex Tester

  1. Type a pattern and flags.
  2. Paste test text.
  3. Review highlights and groups.

How it works

Flags: g global, i ignore case, m multiline, s dotAll, u unicode, y sticky, d indices. Parentheses create capture groups; \b marks word boundaries; \d matches digits.

Worked example

The default email pattern finds hello@billgen.com and support@example.org in the sample text.

Good to know

Syntax errors are shown immediately.

Matches are capped at 1,000 to keep the page responsive.

Regex flavors differ between languages; this tests JavaScript only.

Frequently asked questions

It finds all matches instead of stopping after the first.

Mostly similar but not identical; lookbehind and named groups differ.

Nested quantifiers can cause catastrophic backtracking.

BillGen provides general-purpose tools; verify important outputs before relying on them.