Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

330.Advanced search and replace -- How to exchange the 1st and 2nd lines in each paragraph?

User: editor -- 2009-05-12          << 329  331 >>
Hits: 1993
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to exchange the 1st and 2nd lines in each paragraph?
Input Sample:
line11 
line12 
line13 
... 
 
line21 
line22 
line23 
...
Output Sample:
line12 
line11 
line13 
... 
 
line22 
line21 
line23 
...
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 "Paragraph" 
* set "Replace with Pattern" to: 
 
3. Click "Replace", done! 
Download Script:  scripts/330.rst.zip

Screenshot 1:  Replace_Window


Similar Examples:
How to randomly select one line from each paragraph? (70%)
How to exchange 1st and 3rd line OR 1st and 3rd paragraph in a text? (60%)
How to sort paragraphs base on the second word in each paragraph? (58%)
How to extract 3 lines from each file randomly? (57%)
How to correct typos in a paragraph? (56%)
How to split each line of text into 2 lines with same number of characters? (55%)
How to enclose all the odd number of lines with a pair of tags? (54%)
How to separate each paragraph by two lines? (53%)

Check Demo of Advanced search and replace
Keywords:
exchange  1st  2nd  paragraph  paragra  para  lines  par  change  each  exchange lines  exchange replace  search paragraph  paragraph replace  replace paragraph  search lines  replace lines  search and replace open source