Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

125.Advanced search and replace -- How to change all AXXX.jpg to A(XXX+100).jpg in a text file?

User: editor -- 2008-05-17          << 124  126 >>
Hits: 366
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to change all AXXX.jpg to A(XXX+100).jpg in a text file?
Input Sample:
..........A001.jpg
.......................A002.jpg
.................A003.jpg
............................A004.jpg
Output Sample:
..........A101.jpg
.......................A102.jpg
.................A103.jpg
............................A104.jpg
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open source file
2. ctrl-h open 'Replace' dialog
in 'Replace' page,
* set 'Search for Pattern':

* set 'Replace with Pattern':

3. click 'Replace', ok.
Note: 
*$match[2..4] means 'XXX' in AXXX.jpg
*calc($match[2..4]+100,"03") means add 'XXX' by 100 and output with width of 3.
Download Script:  scripts/125.rst.zip

Screenshot 1:  Replace_Window


Similar Examples:
How to change all the letters in a text file to upper cases? (56%)
How to shuffle all the lines in a text file? (56%)
How to change the direction of all sentences in a text file? (54%)
How to exchange the line 10 and 20 from many text files all at once? (54%)
How to extract all upper cases words from a text file? (52%)
How to count number of digits(0-9) in a text file? (52%)
How to change all numbers in a text file to 2 decimial places? (51%)
How to extract all IP address from a text file? (51%)

Check Demo of Advanced search and replace
Keywords:
axxx  ddd  jpg  100  calc  means  mean  cal  how to change  output  add page  change text  add text  output file  search and replace open source  add 1  all text  text file search and replace