>
B's Code

Regex Tester

Test a regular expression against sample text. Matching runs entirely in your browser.

[ PATTERN ]
//
[ SAMPLE TEXT ]
[ 0 MATCH(ES) ]
  • // no matches yet

About Regex Tester

A regular expression describes a text pattern. This tester uses the browser's own JavaScript regex engine, so what you see here is exactly how the pattern behaves in Node.js and browser code.

How to use it

  1. Enter your pattern, without the surrounding slashes.
  2. Toggle flags such as g, i, m, and s as needed.
  3. Paste sample text below to see matches highlighted.
  4. Inspect the numbered and named capture groups for each match.

Frequently asked questions

Which regex flavour is this?
JavaScript (ECMAScript). Syntax that only exists in PCRE, Python, or .NET — such as recursion or possessive quantifiers — is not supported.
What do the flags mean?
g finds all matches rather than the first, i is case-insensitive, m makes the anchors match at line boundaries, and s lets the dot match newlines.
Is my text sent anywhere?
No. The pattern runs against your text locally in the browser.