SamNet • Tools

Regex Tester

Flags:

Test String

Matches

How to Use

Type a regular expression in the pattern field above and enter test text below. Matches are highlighted in real time. Toggle flags (global, case-insensitive, multiline, dotall, unicode) to change matching behavior. Use the preset buttons to try common patterns instantly.

Quick Reference

.Any character (except newline by default)
\dDigit [0-9]
\wWord character [a-zA-Z0-9_]
\sWhitespace (space, tab, newline)
*Zero or more
+One or more
?Zero or one (optional)
{n,m}Between n and m times
[abc]Character class (a, b, or c)
[^abc]Not a, b, or c
^Start of string/line
$End of string/line
()Capture group
(?:)Non-capturing group
a|bAlternation (a or b)
\bWord boundary

About

This regex tester uses JavaScript's built-in RegExp engine. All processing happens in your browser — no data is sent to any server. It supports all modern JavaScript regex features including named groups, lookahead, lookbehind, and Unicode property escapes.

Back to Tools