| User: editor -- 2009-12-18 |
| Hits: 139 |
| Type: Regular expression replace |
| Search all Regular expression replace examples |
| Description: |
| I have a text file with many words such as "old", I just want to replace the last 5 "old" into new words like "new", how to replace it using regular expression? |
| Input Sample: |
| 1111 old old 2222 old old 3333 old old 4444 old old 5555 old old |
| Output Sample: |
| 1111 old old 2222 old old 3333 old new 4444 new new 5555 new new |
| Answer: |
| Hint: You need to Download and install "Replace Pioneer" to finish following steps. |
| 1. ctrl-o open source text file 2. ctrl-h open replace window in search for pattern, fill: in replace with pattern, fill: 3. click 'Replace', ok. 4. ctrl-s save the file. |
| Download Script: scripts/369.rst.zip |
Similar Examples: |
| How to batch replace 'old' to 'new' in many pdf files? (70%) How to batch replace 'old' to 'new' in many word doc files? (67%) How to batch remove/delete first and last line of many text files? (65%) How to make a batch replacement according to a text mapping file? (63%) How to batch extract specified lines from a text file? (62%) How to replace every 3 instances found in a text file? (61%) How to search and replace multiple terms with 1 common term in text file? (59%) How to batch remove/delete non-fixed text in a text file? (59%) |
Check Demo of Regular expression replace |