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
591.Advanced search and replace -- How to expand all the numbers in the list and seperate them by comma?
User:
editor -- 2010-08-17
<< 590
592 >>
Hits:
281
Type:
Advanced search and replace
Search all
Advanced search and replace
examples
Description:
How to expand all the numbers in the list and seperate them by comma?
Input Sample:
1-10, 20-30,
101-128,
5-6
Output Sample:
1,2,3,4,5,6,7,8,9,10
20,21,22,23,24,25,26,27,28,29,30
101,102,....,127,128
5,6
Answer:
Hint: You need to
Download and install "Replace Pioneer"
on windows platform to finish following steps.
1. ctrl-o open source text file
2. ctrl-h open 'replace' window
* in 'search for pattern', enter:
(\d+)-(\d+)
* in 'replace with pattern', enter:
join(",",($1..$2))
3. click 'replace', done!
Screenshot 1: Replace_Window
Similar Examples:
How to replace all the numbers in a text file to the square value?
(59%)
How to replace all numbers 93 in every line that contains gas?
(58%)
How to sort all the numbers in each line randomly?
(57%)
How to extract all numbers that are greater than 60 in a text file?
(56%)
How to change all numbers in a text file to the comma separated numbers?
(56%)
How to replace a word with a list of words repeatly in a text file?
(55%)
How to convert all numbers from decimal to percentage?
(55%)
How to extract/parse all lines with number greater than 40?
(55%)
Check Demo of
Advanced search and replace
Keywords:
seperate
123
comma
join
numbers
list
number
ber
num
enter
replace by list
replace comma
text to numbers
replace text list
replace list
search and replace open source
search and replace text
replace text pattern