🔍

RegEx Tester & Builder

Type a regex pattern. See all matches highlighted in real-time. Capture groups shown with different colors. Match count, positions, and statistics displayed instantly. Pattern library has common regexes: email, URL, phone, dates, IPs. Find & replace with backreferences and named groups. Pattern explainer breaks down what each part does in plain English. Code generation for JavaScript, Python, Java, PHP, Ruby, Go, C#, Rust, SQL, Perl. Warns about catastrophic backtracking. Everything runs in your browser.

Regular Expression Pattern
Enter your regex pattern and select flags
//g
Test String
Enter text to test your pattern against
Find & Replace
Test replacement patterns with backreferences ($1, $2, etc.)

Use $1, $2 for capture groups, $& for full match, $` for before, $' for after

How to Use

  1. Type your regex pattern
  2. Pick flags (g, i, m, s, u, y) if needed
  3. Paste test text
  4. See matches highlighted with capture groups
  5. Use pattern library for common patterns
  6. Export code in your language

Frequently Asked Questions