【发布时间】:2021-01-13 15:11:23
【问题描述】:
我的文件包含不均匀的 cmets:
// file1.php
// Week 4
// Quiz
//coment3
// comment4
/ /comment5
/ /comment6
%comment7
% comment8
%comment9
#comment10
# comment11
#comment12
我想通过将 # 或 // 替换为 // 后跟一个空格来使这些 cmets 保持一致。
我有:s/[ \t]*//.
它给了我
// file1.php
// Week 4
// Quiz
//coment3
// comment4
/ /comment5
/ /comment6
#comment10
# comment11
#comment12
【问题讨论】: