Last active
August 29, 2015 14:14
-
-
Save johnnymo87/fb3e4a0f7dff7cf60d37 to your computer and use it in GitHub Desktop.
Vim regexes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
M-D to D-M | |
:%s:\(\d\{1,2}/\)\(\d\{1,2}/\):\2\1:g | |
Discard all but the last 4 digits | |
::%s:\v.*(\d{4}):\1:g |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Date is at end of row ... some of them need
20
prepended.:%s:\v(.*)(\d{1,2}/\d{1,2}/)(\d{1,2})$:\1\220\3:g