Regex Tester

Test regular expressions in real-time. Match, replace, and split with live highlighting. Supports all JavaScript regex flags.

Embed this tool
//g
Valid regex

Results(6 matches)

Hello World! This is a Test string with Multiple Words.
Match 1: Hello
Group 1: H
Match 2: World
Group 1: W
Match 3: This
Group 1: T
Match 4: Test
Group 1: T
Match 5: Multiple
Group 1: M
Match 6: Words
Group 1: W

Advertisement

Ad

Regex Cheat Sheet

Character Classes

  • . — any character
  • \d — digit
  • \w — word char
  • \s — whitespace
  • [abc] — any of a,b,c

Anchors & Quantifiers

  • ^ — start of string
  • $ — end of string
  • * — 0 or more
  • + — 1 or more
  • ? — 0 or 1
  • {n,m} — between n and m

Groups & Lookarounds

  • (abc) — capture group
  • (?:abc) — non-capturing
  • (?=abc) — lookahead
  • (?!abc) — negative lookahead
  • (?<=abc) — lookbehind

Special

  • \b — word boundary
  • | — OR operator
  • \1 — backreference
  • \n — newline
  • \t — tab

Frequently Asked Questions

This tester uses JavaScript regular expressions (ECMAScript standard). It supports all modern features including lookaheads, lookbehinds, named capture groups, and the dotAll (s) flag.

Related Tools