Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1370.Advanced search and replace -- How to randomly generate some of the permutation of paragraphs?

User: ddumetz -- 2016-06-10          << 1369  1371 >>
Hits: 2612
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to randomly generate some of the permutation of all paragraphs?
Input Sample:
aa1 
aa2 
 
bb1 
bb2 
 
cc1 
cc2
Output Sample:
FILENAME:001.txt 
bb1 
bb2 
 
aa1 
aa2 
 
cc1 
cc2 
FILENAME:002.txt 
bb1 
bb2 
 
cc1 
cc2 
 
aa1 
aa2 
FILENAME:003.txt 
cc1 
cc2 
 
bb1 
bb2 
 
aa1 
aa2 
 
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 with pattern':  
click 'advanced' tab: 
* set 'run following at the begin..': 
 
* set 'run following for each...': 
 
* set 'output file' to a file in the output folder: 
 
* change the "<" at the left of 'output file' to "<< split by paragraph" 
click 'settings' page: 
* set 'para start' to:  
* set 'para end' to: None 
3. click 'replace', done, file 001.txt, 002.txt, ... will be created. 
 
Note: you need change $N=3 to desired #

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Advanced_Window


Screenshot 3:  Replace_Settings_Window


Similar Examples:
How to generate permutation of all paragraphs? (78%)
How to randomly select one line from each paragraph? (66%)
How to randomly delete some percent of lines that don't have bracket? (60%)
Translate some Abbrs in the paragraph (60%)
How to generate several different versions of shuffled paragraphs? (58%)
How to generate the 9x9 multiplication table? (55%)
How to randomly replace each word with a list of pre-defined words? (51%)
How to extract all function names from a perl program? (51%)

Check Demo of Advanced search and replace
Keywords:
array  ray  paragraphs  split by paragraph  unique  randomly  return  create  non  paragraph  return tab  split paragraph  split file by paragraph  split a file by paragraph  split para start  split file paragraph  change paragraph  join with output file