← Back to Tools

.* Regex Tester

Write regular expressions and see matches highlighted in real time. Runs entirely in your browser — no data is sent anywhere.

/ /
Enter a pattern above to start matching
Quick:

Matched text is highlighted in yellow. Paste multi-line text freely.

Regex Quick Reference +

How to use this tool

  1. 1 Enter your regular expression pattern in the Pattern field.
  2. 2 Paste or type sample text in the Test String area.
  3. 3 Matches are highlighted in real time as you type.
  4. 4 Use the flags toggles (case-insensitive, multiline, global) to adjust matching behavior.

Frequently asked questions

What is a regular expression?
A regular expression (regex) is a pattern that describes a set of strings. It is used for searching, validating, and extracting text across virtually all programming languages.
What is the difference between greedy and lazy matching?
Greedy matching expands as far as possible (.*). Lazy matching stops as soon as possible (.*?). The difference matters when matching repeated patterns inside a larger string.
How do I match a literal dot?
In regex, a bare dot matches any character. Escape it with a backslash (\.) to match only a literal period.
What are capture groups?
Parentheses create capture groups that extract specific parts of a match. For example, (\d{4}) captures a 4-digit year from a date string.

You might also like