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
1078.Advanced search and replace -- How to replace all instances of string "page-xxx.xhtml" with "page-xxx+2.xhtml"?
User:
willy croezen -- 2013-05-09
<< 1077
1079 >>
Hits:
2870
Type:
Advanced search and replace
Search all
Advanced search and replace
examples
Description:
need to replace all instances of string "page-xxx.xhtml" in an xhtml document to "page-xxx+2.xhtml" where xxx is a 3-digit number between 000 and 999
Input Sample:
page-018.xhtml
page-099.xhtml
Output Sample:
page-020.xhtml
page-101.xhtml
Answer:
Hint: You need to
Download and install "Replace Pioneer"
on windows platform to finish following steps.
1. ctrl-o open text/xhtml file
2. ctrl-h open 'replace' dialogue
* set 'search for pattern' to:
page-(\d\d\d)\.xhtml
* set 'replace with pattern' to:
page-calc($1+2,"03d").xhtml
3. click 'replace', done.
4. ctrl-s save to file.
Screenshot 1: Replace_Window
Similar Examples:
How to replace all consecutive spaces and tabs into one single comma in text file?
(52%)
How to replace every 3 instances found in a text file?
(50%)
How to replace the first 3 spaces into comma in each line of text?
(49%)
How to extract all lines with specified date range from text file?
(48%)
How to replace only one occurrence of string in text randomly?
(48%)
How do I replace all the tags <hr /> in many html files?
(48%)
How to extract all lines that contain "abc" from multiple files?
(47%)
How to replace all duplicate lines with some text?
(47%)
Check Demo of
Advanced search and replace
Keywords:
ddd
document
doc
xxx
digit
dig
between
string
calc
html
replace string with number
replace number in string
search and replace between
search between
between and
replace between
string with
replace a string