正则表达式:更改日期格式
我有一个格式为 mm/dd/yyyy 的日期列表。为了使它们适合 javascript UTC 方法,它们的格式必须为 yyyy,m-1,dd。如何使用正则表达式查找替换(在 Notepad++ 中)来完成此更改?
I have a list of dates formatted as mm/dd/yyyy. In order to fit them into the javascript UTC method, they have to be in format yyyy,m-1,dd. How can I use regex find replace (in Notepad++) to accomplish this change?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您绝对可以不使用记事本++有限的正则表达式支持来执行此操作。您无法使用正则表达式减去值(仅限)。
使用 perl 或其他语言来完成您想要的操作。
You can most definitely not do this with the limited regular expression support of notepad ++. You can't subtract values with regex(only).
Either use perl or some other language to do what you want.