Skip to main content
All tools/Regex Tester

Regex Tester

Write a regular expression and see matches highlighted in real time. Toggle flags (g, i, m, s, u) and inspect each match with its position.

Pattern
//g
Test String

About this regex tester

Uses the JavaScript RegExp engine so results match exactly what you'd see in a Playwright, Cypress, or Jest test. Useful for building input validation patterns, log parsers, or test assertions that use regex matchers.

The g (global) flag is enabled by default so all matches are shown. Disable it to match only the first occurrence. The m flag is important when testing multi-line strings — it makes ^ and $ match individual line boundaries rather than the whole string.