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:
2923
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 multiply numbers in each line after a certain comma?
(59%)
How to replace all the numbers in a text file to the square value?
(59%)
How to find numbers in specified location and sort them?
(58%)
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 replace the second column in a tab seperated file?
(56%)
How to replace numbers with alphabets and reverse their order in all tags?
(56%)
How to find missing numbers from a list of numbers?
(56%)
Check Demo of
Advanced search and replace
Keywords:
seperate
123
comma
numbers
join
list
enter
number
ber
num
list numbers
replace by list
all numbers
search numbers
replace comma
with numbers
replace numbers in text
text to numbers