Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

776.Replace text in multiple files -- How to remove leading and trailing blanks in each line in many files?

User: editor -- 2011-05-06          << 775  777 >>
Hits: 2336
Type: Replace text in multiple files   
Search all Replace text in multiple files examples
Description:
How to remove leading and trailing blanks in each line in multiple text files?
Input Sample:
<space><space>line1<space> 
<space>line2<tab><tab> 
...
Output Sample:
line1 
line2 
...
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. open 'Tools->Batch Runner' menu 
2. drag multiple text files from Windows File Browser to "Batch Runner" window 
3. click "Fast Replace" button 
* click "Add", set "Search" to: 
 
* set "Replace" to nothing, and click ok 
* check option of "Reg exp" and uncheck option of "Cross Line" 
4. click "Start", done!

Screenshot 1:  Fast_Replace_Window


Similar Examples:
How to remove the trailing blank lines in the end of file? (76%)
How to remove leading spaces and tabs in each line in multiple text files? (72%)
How to create a text file by choosing N random lines from each of many files? (63%)
How to reverse all the words in each line of a csv file? (62%)
How to remove everything after the first comma in each line in a text file? (61%)
How to remove all letters before "=" in each line of text file? (61%)
How to remove/delete all blank lines in a text file? (61%)
How to remove first number in each line for multiple files? (60%)

Check Demo of Replace text in multiple files
Keywords:
trailing blanks  trailing  leading  blank  cross line  many files  fast replace  fast  fas  windows  remove trailing blanks  remove blanks  remove trailing  remove text from many files  remove line from multiple files  remove text from multiple files  remove text from multiple text files  remove line from