Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

264.Advanced search and replace -- How to batch remove/delete first and last line of many text files?

User: editor -- 2008-09-02          << 263  265 >>
Hits: 823
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to batch remove first and last line of many text files?
Input Sample:
line1
line2
line3
line4
Output Sample:
line2
line3
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-h open replace dialog
Set search for pattern as:

2. click "Batch..." button
Click "Pick files" to select multiple files
3. click "Batch Replace" button, done!

Note: ^.*?\n|\S+\s*$ is a regular expression, matching first line or last line.
Download Script:  scripts/264.rst.zip

Screenshot 1:  Replace_Window


Similar Examples:
How to batch remove/delete first 8 lines of many files? (88%)
How to batch remove/delete first 500 bytes of many binary files? (78%)
How to batch remove/delete the last 6 characters of many filenames? (74%)
How to remove/delete all blank lines in a text file? (74%)
How to batch remove/delete non-fixed text in a text file? (72%)
How to remove/delete first column for multiple files? (71%)
How to batch remove/delete one blank line between each two lines in text file? (71%)
How to delete the first word in each line in a text file? (70%)

Check Demo of Advanced search and replace
Keywords:
matching  batch remove first and last  batch remove first  delete first  remove first  last line  last  batch remove  regular expression  first line  batch for remove last line  remove first line of multiple text  line matching  batch remove last line  remove last line batch  batch remove first line text  batch remove last line of a  batch open text remove first line