Already good answers, here are some more....
You could use EmEditor Text Editor
- you can record a search&replace in a macro, edit that macro by copying the command line, and run this.
https://www.emeditor...y/scriptable-macros/- you can also use the search&replace dialog box and enable Batch-Replace:
https://www.emeditor...tures/batch-replace/You could use PowerShell (new WindowsTM batch tool)
Command line usage:
(Get-Content c:\temp\test.txt).replace('[MYID]', 'MyValue') | Set-Content c:\temp\test.txt
http://stackoverflow...file-with-powershellScript usage:
$current=(Get-Content c:\temp\test.txt)
$OUT=$current.replace('[MYID]', 'MyValue')
$OUT=$OUT.replace('XXX', 'ABC')
$OUT | Set-Content c:\temp\test.txt
You could use AutoHotkey:
FileRead, varOrigin, test.csv
StringReplace, varOUT, varOrigin, xxx, ABC, All
StringReplace, varOUT, varOUT, YYY, DEF, All
FileDelete, test.csv
FileAppend, %varOUT%, test.csv
https://autohotkey.c...eplace-in-text-file/You could use MS-Word with VBA
- start record macro
- call search&replace , do your first replacement
- stop recording
- click Macros > Modify
- copy the replacement block of code and modify to your second replacement need
- save and execute
There are more elegent ways with ARRAYs and FOR EACH in Array DO... but for the start that should work for you too.
MS-Word supports Wildcards:
http://word.mvps.org...l/UsingWildcards.htmWithin a macro, you can utilize VBS/VBA RegEx (Set regExp = CreateObject("vbscript.regexp"))
http://superuser.com...replace-in-word-2010http://stackoverflow...alternation-operatorBest way is to copy a own (found) function into the macro code and call that function for the replacement work:
http://bytecomb.com/...-expressions-in-vba/>>> RxReplace VBA Function
Function RxReplace( SourceString, Pattern , ReplacePattern , IgnoreCase , MultiLine , MatchGlobal )
Just some ideas as starting point....