标签: regex date replace rename desktop-application
这个问题也与Mac App Name Mangler有关。有一堆文件和文件夹有6位数的日期。全部采用以下格式 -
YYMMDD
我想要regex将这些变为;
regex
YY-MM-DD
答案 0 :(得分:3)
搜索:(\d{2})(\d{2})(\d{2})
(\d{2})(\d{2})(\d{2})
并替换:\1-\2-\3
\1-\2-\3
演示:http://regex101.com/r/nE3sL5
答案 1 :(得分:1)
匹配这个:
(\d\d)(\d\d)(\d\d)
并替换为
Demo