Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

171.Advanced search and replace -- How to delete the first word in each line in a text file?

User: editor -- 2008-06-02          << 170  172 >>
Hits: 4794
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to delete the first word in each line in a text file?
Input Sample:
1 line1 
2 this is line2 
3 line3 
4 line4 
5 line5 
6 line6 
7 line7 
8 line8 
9 line9 
10 line10 
11 line11
Output Sample:
line1 
this is line2 
line3 
line4 
line5 
line6 
line7 
line8 
line9 
line10 
line11 
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open source file.      
2. ctrl-h open 'Replace' dialog,      
in 'Replace' window, 
* set 'Replace Unit' to 'Line' 
* fill in 'Search for Pattern':      
 
* fill in 'Replace with Pattern':  
  
3. click 'Replace', finish.    
 
Notes: words($match,2,-1," "," ") means the words from second to last one. Use " " as input delimiter and output delimiter.
Download Script:  scripts/171.rst.zip

Screenshot 1:  Replace_Window


Similar Examples:
How to replace each xxx with the first word in the same line in text file? (77%)
How to remove the first 10 characters of each line in text file? (75%)
How to remove everything after the first comma in each line in a text file? (74%)
How to reverse all the words in each line of a csv file? (74%)
How to delete duplicate lines of a text file? (74%)
How to reverse the order of all the lines in a text file? (73%)
How to rearrange the words in each line and top of file? (71%)
How to remove first number in each line for multiple files? (71%)

Check Demo of Advanced search and replace
Keywords:
delete the first  delimiter  first word  second  last  input  how to delete  delete  delet  dele  delete first word from each line  delete the last word for each line  delete first word in each line  second last line  delete last word  delete first words  delete second line  delete the last line