Regex Tester & Cheatsheet

Test JavaScript regular expressions live with instant match highlighting, capture group extraction, and syntax reference cheatsheet below.

Complete Regular Expression Syntax Guide

Regular expressions (Regex) are powerful pattern-matching strings used across software engineering, data cleaning, logs analysis, and web scraping.

Common Pattern Syntax Cheatsheet

Regex Flags Reference

Frequently Asked Questions

Which regex engine flavor does this tester use?

This tool uses native ECMAScript (JavaScript ES2024) regular expression syntax with support for standard flags: global (g), case-insensitive (i), multiline (m), dotAll (s), unicode (u), and sticky (y).

What do \d, \w, and \s match in Regular Expressions?

`\d` matches any digit (0-9), `\w` matches any word character (letters A-Z, numbers 0-9, and underscore _), and `\s` matches whitespace (space, tab, line break).

What is the difference between greedy and lazy matching?

Greedy matchers (`*`, `+`) expand to match as much text as possible. Adding a question mark (`*?`, `+?`) makes them lazy, matching as few characters as possible.

How do I validate an email address using Regex?

A standard email validation pattern is: `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$`

Is my input text or pattern sent to a server?

No. All regex matching, substring evaluation, and group parsing execute 100% locally in your browser JavaScript thread. Your data is completely private.