Regex Tester


Common patterns (click to use)

About this tool

A regular expression (regex) is a compact pattern that describes a set of strings — for example, \d+ matches any run of digits. Developers use them to validate input (is this an email address?), extract data (find all prices on a page), and transform text. This tester compiles your pattern as you type and highlights every match in the test text, so mistakes are visible immediately instead of surfacing later in code. The g flag finds all matches rather than stopping at the first, i makes matching case-insensitive, and m lets ^ and $ match line boundaries. Parenthesized capture groups are listed separately, which helps when you need to pull structured pieces — like area codes out of phone numbers — from a larger match. The cheat sheet below inserts battle-tested patterns for emails, URLs, IPv4 addresses, dates, hex colors, and digit strings. One caution: overly complex patterns with nested quantifiers can freeze a page (catastrophic backtracking), so keep expressions as simple as they can be.

Privacy: all processing happens in your browser. Nothing is uploaded or stored.