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
810.Advanced search and replace -- How to shuffle all sentences ended by period within each line?
User:
chenjia -- 2011-06-29
<< 809
811 >>
Hits:
2652
Type:
Advanced search and replace
Search all
Advanced search and replace
examples
Description:
How to random article by period '.' in text file?
Input Sample:
Article Title
line 1:aaaaaa. bbbbb. cccccc. dddddd. eeeeee.
line 2:eeeeee. ffffff. gggggg. hhhhhh.
Output Sample:
Article Title
line 1:cccccc. aaaaaa. eeeeee. dddddd. bbbbb.
line 2: ffffff.eeeeee. hhhhhh. gggggg.
Answer:
Hint: You need to
Download and install "Replace Pioneer"
on windows platform to finish following steps.
1. ctrl-o open the text file
2. ctrl-h open 'replace' dialog
* set 'replace unit' to 'Line'
* set 'replace with pattern' to:
rand_str_unique($#a+1,map{$_.'. '}@a)\n
* set 'if' to:
(@a=split(/\.\s*/,$match))>1
3. click 'replace', done.
Screenshot 1: Replace_Window
Similar Examples:
How to split one line into 3 to 5 sentences ended by period randomly?
(61%)
How to shuffle all lines without moving some specified lines?
(59%)
How to change the even sequence id of the comma to space in each line?
(56%)
How to add a specified value to the sequence number in each line?
(54%)
How to delete all blank/space at the beginning of each line?
(54%)
How to replace the characters in fixed position in each line?
(54%)
How to delete all text after the second comma in each line?
(52%)
How to rename all files by adding a letter 'x' behind each filename?
(52%)
Check Demo of
Advanced search and replace
Keywords:
how to shuffle all sentences
asp
shuffle
within
sentences
period
sentence
unique
random
rando
shuffle sentences
shuffle text file
text shuffle
shuffle line
replace sentences
search period
replace period
with random line