SEOlust
Text/Utilities

Regex Tester & Builder

Test and debug regular expressions live with match highlighting, capture groups, flags, and a handy cheat sheet. 100% in-browser.

All tools
/ /
Regex cheat sheet
\d digit   \w word char   \s whitespace   . any char
^ start   $ end   \b word boundary
* 0+   + 1+   ? 0 or 1   {2,5} range
[abc] set   [^abc] negated   (a|b) alternation
(...) capture group   (?:...) non-capturing   (?<name>...) named

About the Regex Tester & Builder

Write, test, and debug regular expressions in real time with match highlighting and capture-group inspection — all in your browser.

What this tool does

Enter a regular expression and a test string and see matches highlighted instantly, along with the values of every capture group. Toggle the common flags (global, ignore case, multiline, dotall, unicode) and the results update live. Nothing is sent to a server.

Why it matters

Regex powers validation, search-and-replace, log parsing, redirects, and scraping. Getting a pattern right by trial and error in code is slow; testing it here first saves time and prevents bugs.

  • Validate emails, URLs, slugs, phone numbers and more.
  • Debug why a pattern matches too much or too little.
  • Inspect capture groups and named groups at a glance.
  • Learn regex faster with the built-in cheat sheet.

Tips

Use the flags to control behavior:

  • g finds all matches instead of just the first.
  • i makes the pattern case-insensitive.
  • m makes ^ and $ match line starts/ends.
  • s lets the dot match newline characters.

FAQ

Which regex flavor is used?
JavaScript (ECMAScript) regular expressions, the same engine your browser and Node.js use.
Is my data uploaded?
No. The pattern and test text are processed entirely in your browser and never leave your device.
Does it support named capture groups?
Yes. Named groups like (?<year>\d{4}) are shown in the capture-group table.
Why does my pattern cause an error?
The error message from the regex engine is shown in red. Common causes are unbalanced brackets or parentheses and invalid escape sequences.

Related tools

Pro tip: pair this tool with Upside Down Text Generator and Text Similarity Checker for a faster SEO workflow.