Developer ToolsFree Tool

RegExr Regex Tester

Provided byRegExrregexr.com

Visual JavaScript and PCRE regex tester with side-by-side syntax reference, named-group support, and shareable patter...

Screenshot of RegExr Regex Tester on RegExr
regexr.comOpen the live tool →
About this tool

What RegExr Regex Tester does

RegExr is a browser-based regular expression tester that lets users write patterns in JavaScript or PCRE syntax and see matches against sample text in real time. The interface displays the expression, the test string, and match results side by side, with clickable highlights that reveal captured groups and their values. Beyond basic testing, the tool includes modes for building test suites, a detailed reference sidebar, and options to save or share patterns via unique URLs. It also offers an “Explain” feature that describes the expression in plain English, helping users understand complex patterns without leaving the page.

Step by step

How to use the RegExr RegExr Regex Tester

  1. 1

    Open RegExr and paste the text you want to search in the left panel.

  2. 2

    Enter your regular expression pattern in the right panel, choosing JavaScript or PCRE syntax from the mode selector.

  3. 3

    Matches appear highlighted in the text; click any match or group to view details such as capture group names and values.

  4. 4

    Use the 'Add Test' button to create a test suite, then edit test names, types, and sample text to validate that your pattern matches or fails as intended.

  5. 5

    Save your work by signing in or generate a shareable URL to distribute the pattern and test string to others.

Is it right for you

Best for

Developers and writers who need to build, test, or debug regular expressions quickly without installing local software, especially those who benefit from visual feedback, side-by-side syntax reference, and the ability to share patterns via

Limitations

  • Pattern saving requires signing in or relying on shareable URLs, which may expire or be lost if not bookmarked.
  • The tool operates in the browser only; large patterns or very long test strings may cause performance slowdowns.
  • Explanations generated by the 'Explain' feature are summaries and may not cover every edge case or subtle behavior of the regex engine.
Questions

RegExr Regex Tester FAQ

Can I use RegExr to test regular expressions for both JavaScript and PCRE?
Yes, RegExr supports both JavaScript and PCRE flavors of regular expressions, allowing you to switch between them via the mode selector in the interface.
How can I share a regex pattern I’ve built in RegExr with someone else?
You can generate a shareable URL for your pattern and test string, or sign in to save it to your My Patterns account for persistent access.
What does the Explain feature do in RegExr?
The Explain feature provides a plain-English description of your regular expression, breaking down each component such as character classes, quantifiers, and groups to help you understand how the pattern works.
Is it possible to create a suite of tests to verify a regex pattern matches specific strings?
Yes, RegExr includes an Add Test mode where you can add multiple test cases, name them, and specify whether the pattern should match or not match the provided text.
Keep Exploring

Similar tools

Based on shared tags