Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

783.Regular expression replace -- How to replace a number with another number in same text file?

User: mike -- 2011-05-19          << 782  784 >>
Hits: 334
Type: Regular expression replace   
Search all Regular expression replace examples
Description:
How to find number replace in text?
I have many files in a folder,I need to batch find bbb's number replace to aaa's
number
Input Sample:
aaa 1
bbb 5
Output Sample:
aaa 5
bbb 5
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
Assume the location of line "aaa" and "bbb" are not fixed, following procedure will take first number of bbb's, and update all numbers of aaa's.
1. open "Tools->Batch Runner" window
2. drag multiple files from Windows file browser to "Batch Runner" window
3. click "Fast Replace" button
4. click "Add" to add a rule
* set "search" to:

* set "replace" to:

* click "ok"
5. click "Start", all files will be changed.

Note:
1. Please make backup to avoid mis-operation
2. If aaa and bbb has fixed location, just search: 
replace with:

Screenshot 1:  Fast_Replace_Window


Similar Examples:
How to translate the hex number to decimal number inside a text file? (69%)
How to delete duplicate numbers in every line in text file? (66%)
How to replace a word/string with increasing sequence number in a text file? (65%)
How to replace the second character of every line to 4 in a text file? (65%)
How to replace each xxx with the first word in the same line in text file? (63%)
How to reset all the numbers with format id=NNN in a text file?  (63%)
How to change the number in each line to specified order in a text file? (62%)
How to extract all numbers that are greater than 60 in a text file? (62%)

Check Demo of Regular expression replace
Keywords:
aaa  backup  fixed  same  find  date  operation  sum  regular expression  expression  replace a number with another number in multiple files  find replace add to numbers  add line to another line  batch update text in multiple  to replace a number with another 2  find and replace all numbers  replace text from another file  fixed number