Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试删除文本文件上的大量时间戳。
它的格式如下: Service Commands(04:59) Using system-config-services(03:49)
我希望它看起来像这样: 使用 system-config-services 的 服务命令
我尝试使用以下通配符?和 * 通过将其留空来替换它: 查找尝试1: (??:??)
(??:??)
查找尝试2: (\**:**)
(\**:**)
代替:
什么都没发生。我是否为 textmate 使用了正确的通配符?我在这里想念什么?
Textmate 支持正则表达式。在正则表达式中,?不匹配单个字符,*也不匹配多个字符。假设您在 TextMate 查找对话框中选择了正则表达式选项,您可以使用\(\d\d\.\d\d\). 括号和句点需要用反斜杠字符引用,因为它们是特殊字符。\d 将匹配单个数字。*有关更多操作,请参阅正则表达式文档,例如如何使用+或{}符号指定要匹配的一行中的多少位数。
?
*
\(\d\d\.\d\d\)
+
{}