Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

919.Advanced search and replace -- How to add a leading zero to all 4 digit numbers in multiple files?

User: Vlad -- 2012-02-13          << 918  920 >>
Hits: 1840
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
I have some files that have missing zero. Is there a way to add zero to all 4 digit numbers? Example: find gifts in xxxx but it must be 0XXXX. Is that something we can do? and also on the page I would have about 20 of those XXXX instead of 0XXXX so is there a way to fix it? Thanks.
Input Sample:
find gifts in 2345 
Output Sample:
find gifts in 02345 
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. open "Tools->Batch Runner" menu
2. drag multiple files from "window file browser" to "batch runner" window
3. click "fast replace" to open "fast replace" dialogue 
4. click "add" to add new search/replace rule
* set "search" to 
* set "replace" to 
* click "ok"
5. make sure "regular exp" option is checked, then click "Start" and click "Yes", done!

Note: please backup your files to avoid mis-operation.

Screenshot 1:  Fast_Replace_Window


Similar Examples:
How to add 0 before all 4 digit numbers in multiple filenames? (82%)
How to calculate the summary of all numbers in multiple files? (69%)
How to add empty line at begin of multiple files? (68%)
How to replace a word/string with increasing number in multiple files? (66%)
How to remove all the lines that with odd line number for multiple files? (63%)
How to add h2 tag for all sub-title lines in text file? (61%)
How to remove leading spaces and tabs in each line in multiple text files? (61%)
How to replace strings and numbers with new format in multiple files? (59%)

Check Demo of Advanced search and replace
Keywords:
ddd  leading zero  missing  about  zero  iso  leading  tea  backup  xxx  find replace add to numbers  missing numbers  find and replace all numbers  find numbers  add numbers to multiple files  add multiple numbers in batch  multiple all numbers in file  find and replace add