Skip to content

Regular Expression Tester

Test JavaScript regular expressions with highlighted matches, capture groups, and previews for replacement and extraction.

Regex workbench

JavaScript

Test text

116 UTF-16 units
Runs in your browserCtrl / ⌘ + Enter to run

Test a JavaScript regex replacement with named groups

Paste text containing dates such as 2026-11-16. Enter (?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2}) in the pattern box. Turn on g to find all matches. In Match mode, select a highlighted date to inspect the year, month and day groups.

Switch to Replace and enter $<day>/$<month>/$<year>. The preview shows 16/11/2026 for the example date. This changes the format of matching text. If you also need to check whether a date exists, validate it as a date separately.

Comments

Sign in or create an account to join the discussion.

Loading comments…