S

SeniorTools

Free Online Regex Tester

Write a regular expression, paste your test string, and see matches highlighted in real time — including capture group details. Uses JavaScript's native RegExp engine.

Regular Expression
Flags
Test String

Regex Flag Reference

i — Case-insensitive

Matches both upper and lowercase. /hello/i matches "Hello", "HELLO", and "hElLo".

m — Multiline

Makes ^ and $ match the start and end of each line rather than the entire string.

s — Dot-all

Makes . match newline characters (\n, \r) which it normally skips.

u — Unicode

Enables full Unicode matching. Required to correctly match characters outside the Basic Multilingual Plane (e.g. emoji) and to use \p{...} property escapes.

Common Use Cases

  • Input validation: Verify email addresses, phone numbers, postal codes, and other structured input formats before submission.
  • Log analysis: Extract IP addresses, timestamps, error codes, and other structured data from raw log files.
  • Search & replace: Build complex find-and-replace patterns for code editors, data pipelines, or text processing scripts.
  • Pattern matching: Test patterns for URL routing, feature flags, or string classification before deploying to production.

Frequently Asked Questions

JavaScript's native RegExp engine — the exact same one used by Node.js and every browser. Results here match precisely what you'll get running the same pattern in your own JavaScript code, unlike testers built on a different language's regex engine (which can have subtly different behavior).

Capture groups are parts of your pattern wrapped in parentheses, e.g. (\d{4}) to capture a 4-digit year — they let you extract specific pieces of a match rather than the whole thing. This tool lists each capture group's value separately below the match highlighting.

By default, ^ and $ match only the very start and end of the whole input, and . never matches newlines. Enable the m (multiline) flag to make ^/$ match per line, or the s (dot-all) flag to make . match newlines too.

Yes — enable the u (Unicode) flag to correctly match characters outside the Basic Multilingual Plane, like most emoji, and to use \p{...} Unicode property escapes.

It's completely free with no limits, and nothing is sent anywhere — pattern matching runs entirely in your browser using JavaScript's built-in RegExp.