Regular Expression Tester

Interactive regular expression tester with live highlighting, capture group inspection, and flag controls.

Flags
gFind all matches in the test string.
Current PatternEnter a pattern to begin testing.

Match Preview

Matches will be highlighted here once the pattern finds results.

Match Details

No matches found.

Common Regex Presets

Load a preset to explore typical matching scenarios.

ISO Date (YYYY-MM-DD)

Captures year, month, and day segments from ISO-style dates.

Pattern(\d{4})-(\d{2})-(\d{2})
Flagsg
Test TextOrder date: 2023-10-05 Backup: 2024-01-14
Email With Named Groups

Extract the username and domain parts from email addresses using named groups.

Pattern(?<user>[\w.+-]+)@(?<domain>[\w-]+\.[A-Za-z]{2,})
Flagsgi
Test TextSupport: help(at)example.com Sales: careers(at)my-shop.co
IPv4 Address

Matches IPv4 addresses with strict 0-255 validation for each octet.

Pattern\b(?:(?:25[0-5]|2[0-4]\d|1?\d?\d)\.){3}(?:25[0-5]|2[0-4]\d|1?\d?\d)\b
Flagsg
Test TextPrimary: 192.168.0.1, Backup: 10.0.24.16
Hex Color

Finds shorthand and full hexadecimal color codes.

Pattern#(?:[0-9a-fA-F]{3}){1,2}\b
Flagsg
Test TextPalette: #fff, #0fb981, #1f2937
HTML Opening Tag

Validates simple HTML opening tags with basic attribute pairs.

Pattern^<([a-z]+)(?:\s+[a-z-]+="[^"]*")*>$
Flagsim
Test Text&lt;div class="card"&gt; &lt;input type="text" disabled&gt;