Regular expressions pcre2 · Using regex in tools

Replace in Python

Replace matches using a pattern and a replacement, with \1 style references.

re.sub(r"(\d{4})-(\d{2})-(\d{2})", r"\3/\2/\1", text)

Official Regular expressions pcre2 documentation

More using regex in tools commands

All using regex in tools commands · Regular expressions pcre2 cheatsheet

Was this page helpful?