Regular Expressions 101

Community Patterns

Your search did not match anything

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
([ :]) # look for : and space as possible leading characters ([\"]?) # if there's a quote, disregard it ([0-9]{4}) # find the year - # find the 1st dash ( # Group (4) ( ((0[13578] | (10|12)) # look for 31 day months - # followed by the 2nd dash (0[1-9]|[1-2][0-9]|3[0-1]) # and accept days up to 31 ) | # OR... (02 # look for Feb - # followed by the 2nd dash (0[1-9]|[1-2][0-9])) # and accept up to 29 days | # OR... ((0[469]|11)) # look for 30 day months - # followed by the 2nd dash ((0[1-9]|[1-2][0-9]|30)) # and accept up to 30 days ) ) # closes (4) ([\"]?)([ \"]?)(\s)
/
gmx

Description

Change YYYY-MM-DD to Wikilink in Obsidian

This regex changes YYYY-MM-DD to "[[YYYY-MM-DD]]" for Obsidian

Submitted by Swen Larsen - a month ago (Last modified a month ago)