Contact

Regex Tester

Test a JavaScript regular expression against sample text. See matches, groups, and positions.

JavaScript regular expressions, tested in this browser. Other languages can differ. The sample text is never put in the URL.

Flags

Ctrl/⌘ + Enter

2 matches

Write to hello@nice.build or team@nice.build — not a@b.
  1. hello@nice.build
    at 9
  2. team@nice.build
    at 29

Worked example

The pattern \d+ against “Order 14 and 2” with the g flag finds 14 and 2. Without g, you only see the first match. Capture groups and positions are listed, and matches are marked in the sample.

FAQ

Which regex flavour is this?
JavaScript. Lookbehind and named groups work when your browser supports them. Some other languages differ.
What do the flags do?
g finds every match, i ignores case, m changes how ^ and $ treat lines, s lets a dot match a newline, u turns on Unicode, y is sticky.
Why did a pattern time out?
Some expressions can run for a long time on certain text. The tester stops after a short limit so the page stays responsive.