Home / Web & Developer / Regex Tester
🔍 Regex Tester
Regex Tester – get instant, free results right on your device.
Last updated: November 2026 · Parameter year: 2026 · Methods and sources: Methodology · Editorial policy
What is Regex Tester?
Regular expressions (regex) are a powerful syntax for searching for patterns in text. You need a quick test area to try out whether they work correctly.
This tool applies the pattern you type to the text with the flags you choose, and lists the number of matches along with the matches. For example, the pattern \d+ finds 12 and 345 in the text “a12b345”. Up to 100 matches are shown.
The tool uses JavaScript's regular expression engine; there may be small differences in PHP, Python, or other languages. If you enter an invalid pattern, you get an error message.
How to use
Fill in these fields: Pattern, Flags, Text. Then press the button; the result appears on the same page and your data never leaves your device.
Formula
\d+ with 'a12b345' → 12 | 345
Example
\d+ with 'a12b345' → 12 | 345
Worked examples and tips
Example 1: With the pattern \d+, the flag g, and the text a12b345, the tool finds 2 matches and lists them as 12 | 345. This is the simplest pattern for picking out groups of digits. If you remove the g flag, only the first match is returned.
Example 2: If the text is ali@site.com, veli@ornek.com and the pattern is (\w+)@(\w+)\.com, the result is 2 matches: ali@site.com | veli@ornek.com. Parentheses create capture groups; you need them when you want to get the username and the domain separately. The reason for putting a backslash before the dot is that a bare dot matches any character.
Example 3: When the text is Merhaba merhaba MERHABA, the pattern is merhaba, and the flags are gi, the result is 3 matches: Merhaba | merhaba | MERHABA. The i flag removes the distinction between uppercase and lowercase. As another test, if you apply the pattern ^\d{4}$ to the text 2026 without flags, you are doing an exact 4-digit check and you see 1 match.
Tips and common mistakes: Try the pattern on a small sample text first, then move to the real data. In multi-line text, the m flag is needed for ^ and $ to work as the start and end of a line. In Turkish letters, \w covers only ASCII letters, so characters such as ş, ğ, ı are left out; add them with a class like [a-zçğıöşü]. The greedy .* matches longer than you expect; you can stop it with .*?.
Frequently asked questions
Regex Tester – how to use it?
Fill in the fields and press the button; the result appears instantly. Example: \d+ with 'a12b345' → 12 | 345
Regex Tester – is it free, and is my data stored?
Yes, it is free and requires no sign-up. Because processing happens in your browser, the information you enter is not sent to a server.
Related guide
- What Are JSON, Base64 and URL Encoding? Encoding vs Encryption vs Hashing – What do JSON, Base64, URL encoding, HTML entities, SHA and JWT do? Encoding vs encryption vs hashing, with examples that were run and verified.
- What Is Regex (a Regular Expression)? A Beginner's Guide with Tested Examples and Common Mistakes – What is regex, and what do \d \w + * [] () mean? Date, phone and email examples, greedy matching, the Turkish letter issue and a ReDoS warning.
- Email Address Validation: How to Check for a Valid Email – Valid email address format, common mistakes, the limits of regex validation and form tips. A format check does not prove that an address actually exists.