MyPocketTools

Regex Tester - Test Regular Expressions Online

Test, validate and learn regular expressions in real-time with visual highlighting, practical examples and complete reference guide.

Regex Tester
//

g = global, i = ignore case, m = multiline, s = dotAll, u = unicode, y = sticky

What is a Regex Tester?

A regex tester is an online tool that lets you test and validate regular expressions in real-time. Enter your pattern, choose flags, input test text, and see matches immediately highlighted. Perfect for developers who want to debug, learn, or experiment with regular expressions in a visual and interactive way.

Key Features

  • Real-time visual match highlighting
  • Test with all JavaScript flags (g, i, m, s, u, y)
  • 8 ready-to-use examples for Email, URLs, phones and more
  • Complete reference guide with interactive accordion
  • Details for each match: position, capture groups
  • Clickable history of last 30 tests
  • 100% client-side - maximum privacy

Common Use Cases

  • Form validation (email, phone, SSN, etc)
  • Debug regex patterns before implementing in code
  • Learn and experiment with regex syntax
  • Extract data from texts and logs
  • Test edge cases and complex patterns

How to Use

Follow these simple steps to test your regular expressions:

  1. Enter your regex pattern in the 'Pattern' field (without the / / delimiters)
  2. Select desired flags by clicking the buttons (g, i, m, s, u, y)
  3. Enter the text you want to test in the 'Test String' field
  4. Press Enter or click 'Test' to see the results
  5. See highlighted matches and copy results if needed

Tips and Tricks

  • Use the 'g' (global) flag to find all matches, not just the first one
  • Explore the 'Examples' tab to see common patterns and learn from them
  • Check the 'Cheat Sheet' when you forget any syntax
  • Click on history items to quickly reload previous tests
  • Always test your patterns with various examples, including edge cases
Online Regex Tester - Test Regular Expressions | My Pocket Tools | MyPocketTools