Skip to content
Snabbit

Online Regex Tester

Test a regex against text and see match positions and groups.

Developer Tools Runs in your browser

What is a regex tester?

A regex tester runs a regular expression against a test string and shows every match with its position and capture groups. Snabbit lists each hit as @index plus its $1, $2 groups, supports flags like i and m, and reports invalid patterns. It runs in your browser, so your patterns and data stay private.

How to use the Regex Tester

  1. 1 Enter your regular expression and any flags.
  2. 2 Paste the test string you want to match against.
  3. 3 Each match is listed with its index and capture groups.
  4. 4 Adjust the pattern until it matches what you expect.

What you can use it for

  • Debugging a regex before pasting it into code.
  • Checking that a pattern captures the right groups.
  • Learning how flags change matching behaviour.
  • Validating sample input against a validation rule.

Frequently asked questions

What does the @index in the output mean?
It is the zero-based character position where that match starts in your test string, which helps you confirm the pattern is hitting the right places.
How are capture groups shown?
After each match, any parenthesised groups are listed as $1, $2 and so on, with their captured text, so you can verify a complex pattern piece by piece.
Does it use the same engine as my code?
It uses the JavaScript regular-expression engine. Syntax is very close to other flavours, though advanced features can differ between languages.

Related searches

Popular searches people use to find the regex tester and similar tools:

  • regex tester online
  • regex tester online free
  • regex tester online c#
  • regex tester c#
  • regex tester js
  • regex tester 101
  • regex tester java
  • regex tester python
  • regex tester storm
  • regex tester javascript
  • regex tester re2
  • regex tester php

Related tools

More tools like this:

All Developer Tools