| User: editor -- 2008-06-05 << 174 177 >> |
| Hits: 592 |
| Type: Advanced search and replace |
| Search all Advanced search and replace examples |
| Description: |
| How to make a batch replacement according to a text mapping file? |
| Input Sample: |
| Source file: ============== this is old1, this is old2 old3, old4, ... Content of Mapping file: =============== old1 new1 old2 new2 old3 new3 ... |
| Output Sample: |
| Target file =============== this is new1, this is new2 new3, new4, ... |
| Answer: |
| Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
| 1. select menu 'Tools->Dictionary->Import' menu, select the mapping file to import, and select "key<spaces>value" as import format, and click 'Start' 2. click ctrl-o to open source file 3. click ctrl-h to open 'Replace' dialog * in 'Replace' page: set Replace unit to 'Word' set 'Search for Pattern' to: set 'Replace with Pattern' to: set 'If' to: * click 'Settings' page: set input delimiter to Other, and enter at right(note: \W means non-word characters, like space,comma,etc.) 4. Click 'Replace', done! Note: about operation can only replace the whole word, can not replace part of word. * If user also want to replace part of word, should set Replace unit to 'Chars', and explicitly set 'Search for pattern' to: ... |
| Download Script: scripts/175.rst.zip |
Screenshot 1: Replace_Window |
Screenshot 2: Replace_Settings_Window |
Similar Examples: |
| How to make multi-word replacement with a mapping list? (65%) How to batch replace the last 5 "old" with "new" in a text file? (63%) How to rename files according to a given mapping list? (63%) How to batch replace 'old' to 'new' in many pdf files? (61%) How to batch extract specified lines from a text file? (60%) How to search and replace in multiple files base on user-defined mapping file? (59%) How to make base64 encoding on multiple files? (59%) How to batch rename files by a filename mapping list? (59%) |
Check Demo of Advanced search and replace |
| Keywords: |
| about keys whole mapping mapping file dictionary diction dic key user batch file user input word batch replacement batch replace input source batch text replacement replace part of text format batch replace whole word text replacement batch file text input |