← Explore practical examples

FOUNDATION · ICU

Reformat dates

Copy the pattern and text into a8s Regex, enable the flags shown, then paste the replacement to check the preview.

Pattern

\b(\d{4})-(\d{2})-(\d{2})\b

Flags

g

Sample text

Release: 2026-09-05
Follow-up: 2026-09-12

Replacement

$3/$2/$1

Expected output

Release: 05/09/2026
Follow-up: 12/09/2026

This example reformats the structure; it does not validate calendar dates.

View on the App Store ↗