Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove line numbers at the start of each line

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++ ?

like image 593
Aditya Kumar Praharaj Avatar asked Jun 30 '13 23:06

Aditya Kumar Praharaj


People also ask

How do I remove line numbers from certain lines in Word?

On the Page Layout tab, in the Page Setup group, click Line Numbers. Do one of the following: To remove line numbers from the entire document or section, click None. To remove line numbers from a single paragraph, click Suppress for Current Paragraph.


1 Answers

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

like image 152
p.s.w.g Avatar answered Oct 16 '22 12:10

p.s.w.g