Remove line numbers at the start of each line

2019-02-17 22:17发布

I have numbers at the start of each line in my text file in the following format :

1: text written ....
2: text written ....

which continues upto 973 lines.
I want to delete any starting numbers with a space and a colon after it ... How do I do it using regex in Notepad++ ?

2条回答
闹够了就滚
2楼-- · 2019-02-17 23:04

You can use this pattern:

^\d+\s:

If you can possibly have more than one space after it like this:

1   :
10  :
100 :

Use this pattern:

^\d+\s+:

Make sure you have Wrap around checked:
enter image description here

查看更多
一纸荒年 Trace。
3楼-- · 2019-02-17 23:09

try this, it should work

^\d+(?:\.\d+)?%$
登录 后发表回答