Replace Pioneer Home
All Examples
Free Download
all
Advanced search and replace
Replace text in multiple files
Regular expression replace
Batch file rename
Batch download
Text file parser
Text file splitter
Html text generator
Search replace binary
Random word generator
Count and statistics
Character encoding
Bin Hex Oct Dec converter
Text generator
Text sort
Text merge
Text data calculation
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:
479
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:
$match[2] $match[1] $match[3..]\n
3. Click "Replace", done!
Download Script:
scripts/330.rst.zip
Screenshot 1: Replace_Window
Similar Examples:
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 extract all links from a web page?
(53%)
How to add first line to the start of each line?
(51%)
How to merge 3 text files by getting one line from each file repeatly?
(51%)
How to extract all function names from a perl program?
(51%)
How to remove everything from start of line to the first comma in each line?
(50%)
Check Demo of
Advanced search and replace
Keywords:
exchange
1st
2nd
paragraph
para
lines
par
change
each
replace unit
exchange lines
exchange replace
search paragraph
paragraph replace
replace paragraph
search and replace open source
search replace
to replace