Regex Tester & Developer

Write, test, and debug regular expressions in real-time with capturing groups and replacement preview.

REGEX PRESETS

REGEX CHEATSHEET

DigitAny digit [0-9]
\d
Non-digitAny non-digit [^0-9]
\D
Word characterAlphanumeric + underscore [a-zA-Z0-9_]
\w
Non-word characterAny non-word character
\W
WhitespaceSpaces, tabs, newlines
\s
Non-whitespaceAny non-whitespace character
\S
Any characterAny character except newline
.
RangeLowercase character from a to z
[a-z]
Negated RangeAny character NOT from a to z
[^a-z]

* Click a token to insert at cursor

//gim
Feel free to write to [email protected] or [email protected] for inquiries. The address postmaster@localhost is also active. Invalid email like hello@world will not match.

MATCH DETAILS

2 matches
Match 1Range: 2241 (Length: 19)
Group $1:"support"
Group $2:"example"
Group $3:"com"
Match 2Range: 4568 (Length: 23)
Group $1:"admin"
Group $2:"test-domain.co"
Group $3:"uk"

SUBSTITUTION / REPLACE

Use $0 for whole match, $1, $2... for captured groups.
Feel free to write to [email: support at example] or [email: admin at test-domain.co] for inquiries. The address postmaster@localhost is also active. Invalid email like hello@world will not match.

What is Regex Developer & Tester?

Our Regex Developer & Tester is a free browser-based tool that allows you to easily compose, test, and debug regular expressions. Built entirely client-side using JavaScript, it provides real-time highlighting of matched text, lists details for capture groups, enables quick replacement previews, and offers a comprehensive cheatsheet that automatically inserts patterns at your cursor. Your testing data is kept completely private as no inputs are sent to any external server.

Key Benefits of Online Regex Debugging

  • Real-Time Evaluation: Instantly compile and test your regular expressions as you type.
  • 100% Client-Side Privacy: No data leaves your machine. Your test strings and regex patterns are secure.
  • Group Capturing Analysis: Break down matched structures and trace exactly what each capturing group matches.
  • Interactive Cheatsheet: Easily click to insert common regex constructs such as character classes, quantifiers, anchors, and lookarounds.
  • Alternate Highlighting: Distinct colors for adjacent matches to prevent confusion over boundaries.

How to use Regex Developer & Tester

Step 1

Choose a Preset from the dropdown (like Email, URL, IP) to see an example, or start from scratch.

Step 2

Enter your regular expression pattern in the main input box.

Step 3

Toggle the flags (g, i, m, s, u, y) based on your requirements.

Step 4

Enter or paste your target text in the 'Test String' editor.

Step 5

Review the highlighting in the match viewer and examine the detailed match logs and capturing groups below.

Step 6

Optional: Enter a substitution pattern in the Replacement section to see a live replacement output.

Thank you for utilizing our developer utilities! Keep coding safely.