ToolsRiver Income Tax

Regex Tester

  • Free, no sign-up
  • Runs in your browser
  • Works on mobile
Matches highlighted
Tested in November 2026. Matches, groups, named groups, flags, replacement, errors, Unicode patterns and the 1000 match limit were tested with sample patterns.

How to test a regular expression

  1. Type your pattern in the top box without the slashes.
  2. Choose the flags you need. Global is on by default so every match is found.
  3. Paste the text to test. Matches are highlighted and listed with their position and groups.
  4. Add a replacement if you want to test a replace. Use $1, $2 and $<name> for groups.
  5. Click Copy expression to copy the pattern with its flags.

Tips for better results

  • Click Load an example to see groups and a replacement at work.
  • Turn on the unicode flag to use patterns such as \p{L} for letters in any language.
  • Turn on multiline to make ^ and $ work on each line.
  • Build the pattern in small steps and watch the highlight change.

Limits to know about

  • The tester uses the JavaScript regular expression engine. Other languages such as Python or PHP can behave differently.
  • A pattern with heavy backtracking on long text can freeze the page for a while.
  • Only the first 1000 matches are used and the table shows the first 200.
  • Hindi words that use vowel signs can split in the middle with \p{L}. Add \p{M} to include the signs.

Privacy

Your pattern and text stay in your browser and are not sent to ToolsRiver.

Frequently asked questions

What does the g flag do?

It finds all matches instead of only the first one.

How do I use groups in a replacement?

Write $1 for the first group, $2 for the second and $<name> for a named group.

Why do I see an invalid pattern message?

The pattern has a syntax problem, such as a bracket that is not closed. The message says what is wrong.

Can I test a pattern for Python?

You can try it, but features differ. Check the result in your own language.

Is it free?

Yes, with no sign-up.

About this tool

ToolsRiver Regex Tester shows matches, groups and replacements live for JavaScript regular expressions. It runs in your browser.

Try these next

Share this tool

Scroll to Top