user3154652
user3154652

Reputation: 21

Delete first word of each line of text file

I have a text file formatted like this:

username coins

I need to remove the username from the the line in Notepad++. Just removing the first word in each line

Upvotes: 2

Views: 3819

Answers (3)

Lawrence K Townsend
Lawrence K Townsend

Reputation: 1

Delete word and space at the beginning of the line

Find: ^\w+\s(.)

Replace with: \1

^ beginning of the line
\w+ first word
\s space
(.) tag the rest of the line

\1 only include the rest of the line

Upvotes: 0

ericbn
ericbn

Reputation: 10958

Search > Replace...

Find what: ^[^\s]+\s
Replace with: (blank)
Search mode: Regular expression

Upvotes: 2

brenton
brenton

Reputation: 558

Try using a regex in the Replace:

^([\w\-]+) 

(There is a space at the end of this regex to include the trailing spaces).

Replace with nothing, change the Search Mode to Regular Expression..

Upvotes: 3

Related Questions