Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

847.Regular expression replace -- How to remove leading spaces and tabs in each line in multiple text files?

User: editor -- 2011-09-02          << 846  848 >>
Hits: 2636
Type: Regular expression replace   
Search all Regular expression replace examples
Description:
How to remove leading spaces and tabs in each line in multiple text files?
Input Sample:
<spaces>line1
line2
<spaces>line3
<spaces>line4
Output Sample:
line1
line2
line3
line4
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 file from File Browser to "Batch Runner" window
3. click "Fast Replace" button
4. click "Add" to add a rule:
* set 'search' to: 
click ok
5. check 'reg exp' option, uncheck 'cross line' option.
6. click 'start', done!

Screenshot 1:  Fast_Replace_Window


Similar Examples:
How to remove leading and trailing blanks in each line in many files? (72%)
How to remove everything after the first comma in each line in a text file? (71%)
How to remove/delete extra blank lines in multiple text files? (70%)
How to remove first number in each line for multiple files? (68%)
How to replace specific spaces into comma in each line of text file? (68%)
How to move the last line to the beginning for multiple text files? (67%)
How to remove the last 3 lines of multiple text files all at once? (67%)
How to shuffle specified lines in multiple text files? (66%)

Check Demo of Regular expression replace
Keywords:
tabs  remove leading spaces  remove leading space  leading space  abs  leading  spaces  cross line  space  regular expression  remove tabs  text file remove multiple spaces  remove leading spaces in text file  replace multiple spaces in a text file  replace multiple spaces  multiple spaces  replace multiple spaces in file  add spaces text file