在Notepad ++中删除行号

时间:2016-01-26 22:12:35

标签: notepad++

如何删除每行的行号?我尝试[[:d:]]正则表达但不工作 例如:http://i.stack.imgur.com/tAhoa.png

1 个答案:

答案 0 :(得分:1)

很难从您发布的图片中判断出来,但假设行号后面有空白的可能性,请使用以下内容:

CTRL + H 或进入查找窗口。选择替换选项卡并将搜索模式设置为正则表达式。

使用此表达式:^\h*Line\h*\d+:\h*

将替换框留空值,然后按全部替换

这将改变,例如:

    Line 198135: Stuff
    Line 198136: you
    Line 198140: need to keep
    Line 198143: ...
    Line 198144: ...
    Line 198145: ...
    Line 198146: ...
    Line 198147: ...
    Line 198148: ...
    Line 198149: ...
    Line 198150: ...
    Line 198152: ...
    Line 198153: ...
    Line 198155: ...
    Line 198156: ...
    Line 198157: ...
    Line 198158: ...
    Line 198159: ...
    Line 198160: ...
    Line 198161: ...
    Line 198162: ...
    Line 198174: ...
    Line 198175: ...
    Line 198176: ...
    Line 198181: ...
    Line 198183: ...
    Line 198184: ...
    Line 198185: ...
    Line 198186: ...
    Line 198190: ...

进入这个:

Stuff
you
need to keep
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...