Skip to content
Regex pack·Free

Date and time patterns

17 patterns for Find and replace. Five rewrite dates: dd/mm/yyyy, mm/dd/yyyy and dd.mm.yyyy to yyyy-mm-dd, and back to the last two. The rest find written dates, 12-hour times, HTTP dates, Unix timestamps, ISO durations and weeks, UTC offsets, time zones and cron lines.

Free to install.

If PocketCode is installed on your Android device, this opens the page in the app.

Preview

3 of 17

  • \b(0[1-9]|[12]\d|3[01])/(0[1-9]|1[0-2])/(\d{4})\b

    dd/mm/yyyy to ISO yyyy-mm-dd

  • \b(0[1-9]|1[0-2])/(0[1-9]|[12]\d|3[01])/(\d{4})\b

    US mm/dd/yyyy to ISO yyyy-mm-dd

  • \b(0[1-9]|[12]\d|3[01])\.(0[1-9]|1[0-2])\.(\d{4})\b

    dd.mm.yyyy to ISO yyyy-mm-dd

Changes in 1.0.0

First version.

Related

Validation patternsFreeRegex pack16 patterns for Find and replace: emails, URLs, domains, IPv4, E.164 phone numbers, IBANs, slugs, semver, ISO dates and times, UUIDs, hex colours, MAC addresses and JWTs. One of them rewrites ISO dates as dd/mm/yyyy.More validation patternsFreeRegex pack15 more patterns for Find and replace, for what the Validation patterns pack leaves out: IPv6, CIDR ranges, host:port, MD5 and SHA hashes, git hashes, ULIDs, ObjectIds, ZIP and UK postcodes, coordinates, numbers, ISBN-13, usernames and password rules.Log patternsFreeRegex pack17 patterns for reading logs in Find and replace: log levels, ERROR and WARN lines, logcat lines, stack traces from Java, Kotlin, Python and JavaScript, access log lines with 4xx and 5xx codes, durations and key=value pairs. One removes the timestamp at the start of each line.URL patternsFreeRegex pack18 patterns for links in Find and replace: URL parts, query and tracking parameters, local, WebSocket and image URLs, URLs with a password in them, Markdown links, href and src values. Some rewrite http:// as https:// or a git@ remote as an HTTPS URL.Code search patternsFreeRegex pack20 patterns for searching code: TODOs, debug prints, hard-coded keys and tokens, function and class declarations, imports, empty catch blocks, Kotlin !!, strings, comments, merge conflict markers and lines over 120 characters. One removes trailing commas in JSON.Text cleanup patternsFreeRegex pack21 patterns that tidy text with Replace all: trailing spaces, indentation, repeated spaces, words and lines, extra blank lines, CRLF, tabs, curly quotes, invisible characters and HTML tags. Others mask emails and IPs or turn a list into quoted lines.