Home » Developer Tools » Regex Tester
Test regular expressions live - matches highlighted as you type.
Last updated 13 November 2026
BotixTech's free regex tester helps you build and debug regular expressions with instant feedback. Type a pattern, paste a test string, and every match lights up as you type.
Toggle flags like global, ignore-case and multiline, inspect capture groups per match, or start from a common preset like email or URL validation.
A regular expression, often called a regex, is a short pattern that describes a shape of text. You write the pattern once, and the tester checks it against any text you paste in, showing every part that fits the shape. Developers use patterns to check email addresses, pull phone numbers out of a message, find dates in a log file, and split messy text into tidy pieces.
This tester runs on JavaScript only. It uses the RegExp engine built into your browser, so it understands JavaScript patterns and the six JavaScript flags. A pattern written for another engine, such as PCRE or Python, may match different text here or fail with an error, so test it here before you trust it in your own code.
Here is a small test you can repeat in the tool. Type the pattern \d+ in the pattern box and paste abc 123 def 456 as the test string. The pattern \d+ means one or more digits in a row.
The tool reports 2 matches found. Match 1 is 123 at index 4, because the letters a, b and c take positions 0, 1 and 2, the space takes position 3, and the digits start at position 4. Match 2 is 456 at index 12, after the space at position 11. Both matches are highlighted in the test string, and both appear in the match details below it.
Try the email preset next. Choose Email address from the Common patterns list and the pattern box fills in at once. Against the sample text already in the test string box, it finds 2 matches: the two email addresses in the sample. That is the fastest way to check a preset before you use it in your own project.
The Common patterns list holds seven ready made patterns. Pick one and it fills the pattern box, so you can test it at once or change it to fit your own text.
https?://[^\s/$.?#].[^\s]* finds web addresses that start with http or https.\+?[0-9][0-9\s().-]{6,}[0-9] finds a run of digits that may carry a plus sign, spaces, brackets, dots or hyphens between them.\b\d{4}-\d{2}-\d{2}\b finds a date written as a four digit year, a two digit month and a two digit day.\b(?:\d{1,3}\.){3}\d{1,3}\b finds four groups of one to three digits split by dots. It checks the shape only. It accepts 999.999.999.999, which is not a real address, because it does not check that each group stays within 0 to 255.#[0-9a-fA-F]{3}(?:[0-9a-fA-F]{3})?\b finds a hash sign followed by three or six hex digits, so it finds both #fff and #7c3aed in the sample text.\d+ finds every run of digits in the test string.Flags change how the pattern is applied. Tick a box to turn a flag on, and the matches update at once. The g flag is checked when the page loads.
This tester highlights matches. It does not change your text, so there is no replace box and no replacement preview. If you need to change matched text with a pattern, do that in your own editor or code, not here.
There is also no pattern explainer and no syntax reference on the page. The match details list shows the first 50 matches only, even when the count above it is higher. Named groups are another limit: if your pattern uses a named group, its matched text appears in the groups list, but the name itself is not shown next to it. The tool lists the values only.
Finally, matching runs in your browser with no time limit. A pattern that backtracks heavily on a long test string can freeze the tab, so keep test strings short while you work on a tricky pattern.
Test the pattern against text that should match and text that should not match. A pattern that matches everything tells you nothing, and a pattern that matches nothing may be too strict.
Start with the g flag on so you see every match, then turn flags off one at a time to see what each one changes. If the error box appears, read the exact JavaScript message: it names the problem, such as an unclosed bracket. Keep the sample text short while you build the pattern, then paste the real text in once the pattern works.
A regular expression (regex) is a mini language for describing text patterns. Developers use it to validate emails, find phone numbers, extract data from text.
All six JavaScript flags: g (find every match), i (ignore case), m (^ and $ match line starts and ends), s (dot matches newlines), u (unicode mode) and y (sticky matching).
The exact JavaScript error is shown above the results. The usual cause is an unescaped special character like an unclosed bracket or a stray backslash.
No. The regex engine is your browser's own JavaScript engine, so your pattern and test text never leave your device.
JavaScript only. The tester uses the RegExp engine built into your browser, so it runs JavaScript patterns and the six JavaScript flags. A pattern written for PCRE, Python or another engine may match different text here or show an error, so test it here before you use it in your own code.
No. This tester only highlights matches in your test string. There is no replace box and no replacement preview, so it cannot rewrite your text. If you need to change matched text, use your own editor or code once the pattern tests cleanly here.
A capture group is a part of a pattern inside round brackets. When that part matches, its text appears in the groups list next to the match in the match details. If you use a named group, its matched text appears in the same list, but the name itself is not shown. The tool lists the values only.
The count above the results shows the total number of matches. The match details below list the first 50 matches, each with its index and its capture groups. If your text has more than 50 matches, the list stops at 50 and notes how many more there are.
Yes, it can happen. Matching runs in your browser with no time limit, so a pattern that backtracks heavily on a long test string can freeze the tab. Keep test strings short while you build a pattern, and close the tab if it stops responding. Your pattern and test text stay on your device either way.
Comparing two versions of text? Use our diff checker.