Skip to main content

Find and Replace with Regex

Regex to find date and time.

Option 1: ([\d]{1,2})/([\d]{1,2})/([\d]{4}) in format mm/dd/yyyy

Option 2: [0-9]{4}-[0-9]{2}-[0-9]{2}T in format yyyy-mm-dd

Option 3: ([0-1]?[0-9]|2[0-3]):[0-5][0-9] in format HH:mm

In Sublime Text Find and Replace (CMD+OPT+F) replace with $3-$1-$2

Sublime Regex Date

This replaces date mm/dd/yyyy with yyyy-mm-dd

The below will verify email address format.

^(?:(?!.*?[.]{2})[a-zA-Z0-9](?:[a-zA-Z0-9.+!%-]{1,64}|)|\"[a-zA-Z0-9.+!% -]{1,64}\")@[a-zA-Z0-9][a-zA-Z0-9.-]+(.[a-z]{2,}|.[0-9]{1,})$