Welcome, Guest — free tools, no signup
Server Time: Jun 08, 2006, 01:44 PM
Home » Developer Tools » Regex Tester & Cheat Sheet

Regex Tester & Cheat Sheet

🔒 Runs in your browser — nothing you enter is uploaded.

Test regular expressions dynamically in your browser. Enter your regex pattern and flags, input sample text, and review captured patterns instantly.

/ /
Matched Outputs Summary
Matches Found:
0
Matches highlighted in yellow...
Match Index Full Match & Groups Details
No capture group results compiled.
Regular Expressions Syntax Cheat Sheet
Character Name Matches Description
. Any Character Matches any single character except newline.
\d, \D Digit, Non-Digit \d matches [0-9]. \D matches any character other than digits.
\w, \W Alphanumeric, Non-Word \w matches basic word characters [a-zA-Z0-9_]. \W matches symbols/spaces.
*, +, ? Quantifiers * (0 or more times), + (1 or more times), ? (0 or 1 time).
{n}, {n,m} Range Quantifiers Matches exactly n times, or between n and m times.
[a-z], [^a-z] Character Set / Negation Matches any character inside the brackets. ^ negates the set.
^, $ Anchors ^ asserts position at the start of string. $ asserts position at the end.
(...) Capture Group Groups multiple tokens together and saves matched strings for reference.

You may also need

Popular next tools

All Developer Tools »   Search all tools »

ADVERTISEMENT Google AdSense - Responsive Content Banner (600 x 100)

How to use the Regex Tester & Cheat Sheet

  1. Type a pattern and flags.
  2. Paste test text.
  3. See matches highlighted live.

What are Regular Expressions and How are they Used?

A Regular Expression (Regex) is a sequence of characters defining a search pattern. They are widely used in search engines, validation scripts, database query modules, and text editors for pattern-matching operations.

Writing regular expressions can be error-prone. This interactive tester parses JavaScript regex rules and formats matches dynamically as you type. By running locally in your browser, it provides a safe sandbox to test patterns against sensitive inputs without data leaks.

Frequently Asked Questions (FAQ)

Q: Why am I getting a regex syntax error?
A: Ensure that parentheses (), square brackets [], and curly braces {} are properly closed. Escape special syntax characters like /, ., or ? with a backslash \ if you want to match them literally.
Q: What is the difference between global (g) and multiline (m) flags?
A: The g flag queries all match occurrences in the string instead of stopping after the first match. The m flag changes anchors ^ and $ to match the start/end of each individual line instead of the entire string.
Q: Are backreferences and advanced groups supported?
A: This tool runs on standard browser JavaScript RegExp engines, supporting capture groups, lookaheads, lookbehinds, and basic backreferences.