Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

206.Advanced search and replace -- How to remove/delete line breaks of all lines which has more than 20 characters?

User: editor -- 2008-06-29          << 205  207 >>
Hits: 562
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
I have a text file containing an article with around 20 characters per line, how to remove the line breaks of all lines other than paragraph end?
Input Sample:
12345678901234567890
12345678901234567890
123456789
12345678901234567890
12345678901234567890
12345678901234567890
12345
Output Sample:
1234567890123456789012345678901234567890123456789
12345678901234567890123456789012345678901234567890123456789012345
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:
* set 'Replace Unit' to 'Line'
* set 'Search for Pattern' to:

* set 'Replace with Pattern' to:
 note: $match not followed by \n means removing line break.
* set 'If' to:

3. Click 'Replace', done!
Download Script:  scripts/206.rst.zip

Screenshot 1:  Replace_Window


Similar Examples:
How to remove all lines that shorter than 10 characters? (71%)
How to extract all lines that has more than 2 numbers? (61%)
How to batch replace lines that has less than 10 characters? (59%)
How to extract all lines with more than 30 characters from multiple files? (58%)
How to remove all lines that contains more than one word? (58%)
How to split each line of text into 2 lines with same number of characters? (56%)
How to remove/delete all lines with even line number? (56%)
How to remove/delete all lines with even line number? (56%)

Check Demo of Advanced search and replace
Keywords:
not followed  line break  break  length  paragraph  delete line  containing  para  how to remove the line  characters  remove paragraph  removing lines  replace remove line break  remove break  remove lines not containing text file  search and replace not followed by  remove end of line  remove all lines containing