Regex Tester

Try a pattern, flags, and sample input to see matches before you commit the expression to application code.

Patterns and sample text are not uploaded.

How to use

  1. Enter a pattern without surrounding slashes.
  2. Add flags such as g, i, or m.
  3. Paste sample text and select Test.

FAQ

Which regex engine is this?

The JavaScript RegExp engine in your browser.

Why did my pattern fail?

Invalid syntax throws a local error. Balanced groups and correct flags usually fix it.

Related tools

Guides: developer guides, service enquiry.