Regex Tester

Test regular expressions against your text with live match highlighting and flags. Free online JavaScript regex tester that runs in your browser.

About Regex Tester

Regular expressions are powerful for validating input, finding patterns and cleaning data, but they are notoriously easy to get slightly wrong. DrToolLab's regex tester lets you type a pattern, choose flags such as global, case-insensitive and multiline, and paste sample text to see every match update live as you edit. That makes it fast to build and debug patterns for phone numbers, PIN codes, GST numbers, email addresses, order IDs or log lines before you put them in your code, spreadsheet formulas or automation tools. The tester uses the JavaScript regular expression engine, which matches the behaviour of web browsers and Node.js and is very close to most other languages for common patterns. If the pattern has a syntax error, the tool tells you instead of failing silently. Your patterns and test text stay in your browser and are never uploaded, so it is safe to test with real data.

How to use Regex Tester

  1. 1

    Enter your regular expression and choose its flags.

  2. 2

    Paste the text you want to test it against.

  3. 3

    See the matches update live and refine the pattern.

Private by design. Everything runs in your browser. The text you enter is never sent to a server or stored.

Frequently Asked Questions

Which regex flavour does this use?

The JavaScript (ECMAScript) regex engine used by browsers and Node.js. Most common patterns behave the same in Python, Java and PHP.

What do the g, i and m flags do?

g finds all matches instead of just the first, i ignores upper/lower case, and m makes ^ and $ match at line breaks.

Why does my pattern show an error?

There is a syntax problem, such as an unclosed bracket or an unescaped special character like ( or ?.

Is my test text uploaded?

No. Matching runs entirely in your browser.

Related Tools