CleanTextly

Regex Tester

Test regular expressions instantly in your browser — enter a pattern, pick your flags, and see matches highlighted live.

Flags
Highlighted Matches
Matches will be highlighted here...
Test String Characters
0
Match Count
0

Common Regex Patterns

Your regex and test data are processed locally in your browser and never uploaded or sent to a server.

CleanTextly's Regex Tester lets you test regular expressions instantly in your browser. Enter a pattern, choose your flags, and paste a test string — matches are highlighted live, along with their positions and capture groups, so you can check a regex or debug why it isn't matching without leaving the page. This is a JavaScript regex tester: patterns run through the browser's native RegExp engine, so syntax matches what you'd use in JavaScript or Node.js rather than PCRE, Python, or .NET regex.

Features

  • Live Match Highlighting

    Matches are highlighted directly in your test string as you type, so you can see exactly what your pattern does and doesn't catch.

  • All Standard JavaScript Flags

    Toggle g (global), i (case insensitive), m (multiline), s (dot all), and u (Unicode) independently to test how each one changes the result.

  • Match Details & Positions

    Every match shows its matched text and start/end position in the string, so you can check a regex or debug a pattern with precision.

  • Capture Groups, Including Named Groups

    Numbered capture groups and named groups like (?<username>...) are broken out individually for every match, not just the overall match text.

  • Clear Error Messages

    An invalid pattern — an unterminated character class, an unmatched parenthesis, and similar — shows a specific, readable error instead of crashing or failing silently.

  • 100% Private

    Your regex and test data are processed locally in your browser using JavaScript's built-in RegExp engine — nothing is ever sent to a server.

How to Use

  1. 1

    Enter your pattern

    Type a regular expression into the Regex Pattern field — just the pattern itself, no need to wrap it in slashes like /pattern/.

  2. 2

    Choose your flags

    Check g to find every match instead of just the first, and add i, m, s, or u as your pattern needs.

  3. 3

    Paste your test string

    Add the text you want to check the regex against into the Test String box.

  4. 4

    Review the matches

    Matches are highlighted instantly, with match count, positions, and any capture groups listed below.

Example

Matching Email Addresses

Pattern (with the g flag)

[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}

Test String

Contact john@example.com or jane@test.org for details.

Common Use Cases

  • Checking a Regex Before Using It

    Test a pattern against real examples before pasting it into your code, to confirm it matches what you expect and nothing else.

  • Debugging Why a Pattern Doesn't Match

    See exactly which parts of your test string a regex catches, so you can spot a missing flag or an overly strict pattern quickly.

  • Extracting Data with Capture Groups

    Use capture groups to check how a pattern splits a match into parts — like a username and domain from an email address — before wiring it into a script.

  • Validating Input Formats

    Test whether values like usernames, dates, or hex colors match an expected pattern using the built-in common regex presets as a starting point.

Frequently Asked Questions

Related Tools