Regex tester
Write a pattern and see live what it matches in your text.
- Category
- For developers
- Price
- free
The tool starts in your browser.
Everything is calculated in your browser. Nothing you type is sent to our server.
How to use it in three steps
The tool as a schematic with this page's example. Each step's number stands where you take it: in the fields, at the result or outside the tool.
Enter the pattern and flags.
Paste the text to test.
See matches and groups live.
Three postcodes and their groups
A pattern is tested on real text, not on an idea of it. The tool highlights the matches in place and lists the groups below. The result is computed by the same function the tool at the top of the page uses, every time the page is shown.
You enter
- Pattern
(\d{2})-(\d{3})- Text
- Kody: 00-950 Warszawa, 30-001 Kraków, 80-827 Gdańsk
- Flags
- g
The expression
- RegExp
- /(\d{2})-(\d{3})/g
The tool always searches with the g flag. With g unticked it shows only the first match.
Matches
- 1. 00-950
- from character 6
- 2. 30-001
- from character 23
- 3. 80-827
- from character 38
Every hit has its place in the text, counted from zero.
Groups
- 1. 00-950
- group 1: 00, group 2: 950
- 2. 30-001
- group 1: 30, group 2: 001
- 3. 80-827
- group 1: 80, group 2: 827
Brackets make groups: the first catches two digits, the second three.
Matches (3)
00-95030-00180-827
Questions
Related tools
The tool does one job. If the same thing should happen automatically in your bot, server or system, we build it.
Missing a tool you need?
Tell us what you want to calculate or generate. We will tell you whether a tool is enough or an integration in your system fits better.