Regex Tester
Type a regular expression and test text, then pick flags, a mode (find / replace / split) and a match limit; every match is listed with content, position, length, capture groups and line number.
Regular expression
Test text
Match mode:
Calculation Result
Download CSV
| No. | Matched content | Start position | End position | Length | Capture groups | Line number |
|---|
Introduction to the tool and how to use it
Online regular expression tester: enter a pattern and test text to match in real time, supporting the g, gi, gm, gim, gs, and gims flags and find, replace, and split modes. The table lists each match's content, start and end positions, length, capture groups, and line number; replace mode supports $1 backreferences. Syntax errors in the pattern give specific hints, zero-width matches advance automatically so nothing freezes, and text is capped at 100000 characters and 2000 lines.
How to use
- Fill the regex pattern and the test text in their boxes.
- Choose the matching mode, flags, and the maximum number of matches.
- Click Run to view the match table.
- Copy the matches or the replaced/split text.
Message board
All messages →-
No one has spoken up yet — want to go first?