Remove First "Word" And Whitespace At Beginning Of Each Line

Tool for Search and Replace across multiple files.
JohnnyQuest
Posts: 2
Joined: Tue Aug 14, 2012 10:23 pm

Remove First "Word" And Whitespace At Beginning Of Each Line

Post by JohnnyQuest »

Hello All!
I would like to remove the first "word" and all whitespace from the beginning of every line in
a text list. NOTE: There is more than one space of whitespace.

EXAMPLE- I want this:
TM-1-1500-328-23 AERONAUTICAL EQUIPMENT MAINTENANCE MANAGEMENT POLICIES AND PROC

To look like this:
AERONAUTICAL EQUIPMENT MAINTENANCE MANAGEMENT POLICIES AND PROC

...all the way down the list. Any help would be greatly appreciated. Thank you in advance!
User avatar
Fool4UAnyway

Re: Remove First "Word" And Whitespace At Beginning Of Each

Post by Fool4UAnyway »

Well, simply said you want to
- remove any string of consecutive non-white space characters
- including any white space characters that follow
- from the start of the line

Find:
^([^\s]+)\s+

Replace by: {leave empty}

Make sure you have the multi-line anchor option set correctly.

Another way of doing this is using the Text FX function to delete the first word of Notepad++.
JohnnyQuest
Posts: 2
Joined: Tue Aug 14, 2012 10:23 pm

Re: Remove First "Word" And Whitespace At Beginning Of Each

Post by JohnnyQuest »

Fool4UAnyway... thank you! That worked perfectly. Exactly what I was trying to do. :D
Post Reply