Skip to content

Image, PDF and QR tools that run in your browser. Your files never leave your phone. Explore tools →

Test a Regular Expression Online

Study & coding100% freePrivate

The short answer

Type your pattern and some sample text, and the matches are highlighted at once, with the groups listed. Use it to build a pattern step by step before you put it in code. It uses JavaScript's regular expressions, so a few features differ from other languages.

Tool

Between the slashes, without them. For example: \d+

Flags

Checking…

Everything runs in your browser. What you type is not sent anywhere.

How to: Test a Regular Expression Online

  1. 1Choose the Regex tab.
  2. 2Type your pattern and choose the flags you need.
  3. 3Paste sample text and look at the highlighted matches.
  4. 4Adjust the pattern until it matches only what you want.

At a glance

Shows
Matches highlighted and groups listed
Flavour
JavaScript regular expressions
Privacy
Runs in your browser; nothing is uploaded

Frequently asked questions

Why does my pattern work here but not in Python?

Regex engines differ in small ways, such as named groups and lookbehind. Check your language's documentation for the syntax it supports.

How do I match an email address?

A simple pattern works for checking the shape, but a perfect email check is very complex. Use a simple pattern and confirm by sending a message.

More quick answers