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.