我有一个包含类似内容的文件(它是一个电影字幕文件)
00:21:39.168 --> 00:21:45.585
There will be 23 days, giving
00:21:48.960 --> 00:21:54.126
We'll talk, Oscar.
Come back soon.
00:22:37.376 --> 00:22:42.293
No, there is no problem.
We'll talk, Oscar.
在以 0(零)开头的每一行中,我想用逗号替换点(第 9 个和第 26 个字符)。
或者简单地说,我需要时间格式为 xx:xx:xx,xxx
答案1
- 单击“查找”->“替换...”
- 激活正则表达式(左侧的星号)
- 查找:(\d\d:\d\d:\d\d)\。
- 替换:\1,
- 单击“全部替换”
\d 匹配任意数字,\1 是括号内的表达式。
更多信息:http://docs.sublimetext.info/en/latest/search_and_replace/search_and_replace_overview.html