vim正则匹配日期给缺少秒的日期默认加上:00
2024-08-07 23:21
2024-08-07 23:23
2024-08-07 23:28
如以上的日期缺少秒,如何用vim批量加上默认的秒:00
:1,$s/\d\{4}-\d\{2}-\d\{2} \d\{2}:\d\{2}/&/gc
:1,$s/\d\{4}-\d\{2}-\d\{2} \d\{2}:\d\{2}/&:00/gc
vim正则匹配日期给缺少秒的日期默认加上:00
2024-08-07 23:21
2024-08-07 23:23
2024-08-07 23:28
如以上的日期缺少秒,如何用vim批量加上默认的秒:00
:1,$s/\d\{4}-\d\{2}-\d\{2} \d\{2}:\d\{2}/&/gc
:1,$s/\d\{4}-\d\{2}-\d\{2} \d\{2}:\d\{2}/&:00/gc