Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1182.Advanced search and replace -- How to shuffle all elements in a specified range in text file?

User: Dilip -- 2014-03-04          << 1181  1183 >>
Hits: 1157
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to shuffle all lines of text in specified range where there are no line
breaks?

Randomize a HTML list. Let the <ul> </ul> remain the same but I need to change
the order of <li> tags in a random manner

This problem relates to http://www.mind-
pioneer.com/services/1181_Advanced_search_and_replace.html but there are line
breaks there. Thanks to Mind Pioneer for helping me in that question



Input Sample:
<ul><li>milk</li><li>butter</li>
<li>eggs</li><li>orangejuice</li>
<li>bananas</li></ul>
Output Sample:
<ul><li>eggs</li><li>bananas</li>
<li>orangejuice</li><li>butter</li>
<li>milk</li></ul>
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open text file
2. ctrl-h open 'replace' dialogue
* set 'search for pattern' to:

* set 'replace with pattern' to:

3. click 'replace', done.
4. ctrl-s save to file.

Screenshot 1:  Replace_Window


Similar Examples:
How to shuffle all lines of text in specified range? (74%)
How to extract all lines with specified date range from text file? (74%)
How to re-group all elements in specified range? (73%)
How to shuffle specified lines in multiple text files? (69%)
How to shuffle all the lines in a text file? (68%)
How to change columns in each line to specified order in text file? (67%)
How to batch extract specified lines from a text file? (65%)
How to change the number in each line to specified order in a text file? (64%)

Check Demo of Advanced search and replace
Keywords:
randomize  shuffle all lines  shuffle  question  break  range  tags  unique  help  tag  replace text with list random  lines tags  replace text in specified range  shuffle lines in the text  random order  replace text random html  shuffle text lines  replace pioneer random line