🏠 Home
CPS Test Aim Trainer Typing Speed Scroll Speed View All Games →
AI Image Generator Background Remover Social Media Cropper Youtube Thumbnails View All Images →
Word Counter Case Converter Invisible Text Text to Speech View All Text Tools →
JSON Formatter Diff Checker Base64 Converter Meta Tag Generator View All Dev Tools →
Unit Converter Age Calculator BMI Calculator Time Zone Converter View All Calculators →
Home > Regex Tester

Regex Tester

Live pattern matching with highlights, groups, flags & cheat sheet.

Matches appear as you type.

Regex Cheat Sheet

TokenMeaning
.Any character (except newline)
\d \w \sDigit, word char, whitespace (capitals negate)
^ $Start / end (of line with m flag)
* + ? {n,m}Repeat greedy (add ? for lazy)
( ) (?: ) (?<= ) (?= )Group, non-capturing, lookbehind, lookahead
[abc] [^abc] [a-z]Character sets and ranges
a|bAlternation (either)
\1 \2Backreference to captured group

Share This Tool

Free Online Regex Tester With Live Highlighting

Regular expressions compress powerful text matching into cryptic one-liners — and one wrong quantifier silently matches everything or nothing. This free tester evaluates JavaScript RegExp patterns live: matches highlight in yellow as you type, capture groups and indices list below, flags toggle per keystroke, and syntax errors explain themselves instead of failing silently.

How to Test a Pattern

  1. Type the pattern without surrounding slashes — flags come from the checkboxes (an email preset loads by default).
  2. Paste test text — real logs, CSV rows, or user input you need to validate.
  3. Read highlights and groups — each match shows its index and captured groups, so extraction logic is verified before it ships.

Flags and Flavors: Know Your Engine

This tester runs your browser's JavaScript engine: g finds all matches, i ignores case, m makes ^$ line-aware, s lets dots span newlines, u enables Unicode mode. Python, PCRE, and Go flavors differ at the edges (lookbehind support, recursion, atomic groups), so always re-verify mission-critical patterns in their target language — what matches here matches Node.js exactly.

Why is my pattern catastrophically slow?

Nested quantifiers like (a+)+ cause exponential backtracking on non-matching input. Rewrite with atomic structure or possessive equivalents, anchor with ^, and keep this tool's 200-match cap in mind as a safety net, not a target.

How do I match emails properly?

Perfect email validation via regex is famously impossible (the RFC grammar is context-sensitive). The loaded preset catches 99% of real addresses; for signup forms, send a confirmation email instead of tightening the pattern forever.

Is my test data uploaded?

No — new RegExp compiles and executes locally; logs and proprietary strings never leave the tab.

Related Tools

Extract matches from text with the Email Extractor, compare pattern outputs with the Diff Checker, and encode results with the Encoder Playground.

⭐
Enjoying NoLoginTool?

Save it for later access 🚀