14,035 services, 0 reports

Developer Tool

Regex Tester

Test and debug regular expressions in real time with visual highlighting — supports JS, PHP, and Python flavors.

Using the Regex Tester

Debugging Regular Expressions (Regex) can be time-consuming. This visual tester provides real-time highlighting of matches and capture groups, helping you refine your patterns for PHP, JavaScript, or Python quickly and accurately.

How it Works

1
Enter your regex pattern in the top field (e.g., /([a-z]+)/i).
2
Paste your test string into the text area.
3
Review the highlighted matches in your test text.
4
Use the sidebar "Cheat Sheet" for quick reference to symbols like \w, \d, and +.

Frequently Asked Questions

What is a regular expression?

A regular expression (regex) defines a search pattern used for string matching, validation, and text processing.

/
/g

Matches

0 matches
Enter a pattern and test string to see matches...

Explanation

Pattern will be explained here...
Regex Quick Reference
Character Classes
  • . - Any character
  • \d - Digit
  • \w - Word char
  • \s - Whitespace
  • [abc] - Any of a, b, c
  • [^abc] - Not a, b, c
Anchors
  • ^ - Start of string
  • $ - End of string
  • \b - Word boundary
  • \B - Not word boundary
Quantifiers
  • * - 0 or more
  • + - 1 or more
  • ? - 0 or 1
  • {n} - Exactly n
  • {n,} - n or more
  • {n,m} - n to m
Groups
  • (...) - Capturing group
  • (?:...) - Non-capturing
  • (?=...) - Lookahead
  • (?!...) - Neg. lookahead