Skip to content
kitify
Esc
↑ ↓ to moveEnter to open

Regex tester

Type a pattern and see every match light up in your text, with capture groups and a live find-and-replace preview.

Flags
Common patterns:

2 matches

Contact ada@example.com or sales@kitify.app by 2026-12-01. London office: SW1A 1AA · New York: 10001-1234 · +44 20 7946 0958 Visit https://kitify.app/developer/regex-tester for more. Brand colour #0b6e7f.
  1. #1 at 8: ada@example.com
  2. #2 at 27: sales@kitify.app

How to test a regex

  1. Type your pattern without the slashes, for example d{3}-d{4}.
  2. Toggle flags: g finds all matches, i ignores case, m makes ^ and $ work per line, s lets . match new lines.
  3. Paste sample text. Matches are highlighted, and each one is listed with its position and groups.
  4. Add a replacement to preview a find-and-replace. Use $1 for the first group or $<name> for named groups.

Regex cheat sheet

PatternMatches
d w sDigit, word character, whitespace
. Any character except a new line
* + ? {2,5}0 or more, 1 or more, optional, between 2 and 5
^ $ Start, end, word boundary
(…) (?:…) (?<name>…)Capture group, non-capturing group, named group
[abc] [^abc]Any of a, b, c; anything except them

This tester uses your browser's JavaScript engine, so results match Node.js and front-end code exactly. Python and PCRE are almost the same for everyday patterns.

Questions people ask

Which regex flavour does this use?

JavaScript (ECMAScript), the same engine as Chrome, Node.js and Deno. It supports lookbehind, named groups and Unicode property escapes.

Why does my regex only find one match?

Turn on the g (global) flag to find every match instead of stopping at the first.

What's a good regex for UK postcodes?

Pick UK postcode in Common patterns. It matches formats like SW1A 1AA, M1 1AE and B33 8TH, with or without the space.

Is my text sent anywhere?

No, matching runs in this page. It's safe for logs and customer data.