| User: Luiz -- 2010-04-19 << 482 484 >> |
| Hits: 3756 |
| Type: Advanced search and replace |
| Search all Advanced search and replace examples |
| Description: |
| How to replace like this : In the original .txt : PRICE=2 3 4 5 (OR PRICE=3 2 5 6 , Any number) Type to find in the .txt all sentences like this : PRICE=X X X X Replace with : PRICE=XXXX Replaced .txt : PRICE=2345 (OR PRICE=3256) In the original .txt : PRICE=Q J K Find : PRICE=Y Y Y Replace with : PRICE=YYY Replaced .txt : PRICE=QJK So basically, USE X to find numbers and Y to find LETTERS. But replace them with the correspondent number. How can I do that |
| Answer: |
| Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
| 1. ctrl-o open source text file 2. ctrl-h open 'replace' window * in 'search for pattern' entry, input: * in 'replace with pattern' entry, input: 3. click 'replace' button, done! P.S. If you want to use X to find Number, use Y to find Letters, you can use \d in place of X, use [A-Za-z] to replace Y. You can write like: PRICE=\d \d \d, PRICE=[A-Za-z] [A-Za-z] [A-Za-z] [A-Za-z] |
| Download Script: scripts/483.rst.zip |
Screenshot 1: Replace_Window |
Similar Examples: |
| How to keep all specified words in an article and remove rest words? (63%) How to search and sum the numbers at specified position in a text file? (62%) How to save specified lines of text file into different files? (62%) How to extarct specified pattern by conditions? (61%) How to extract all specified date format from a text file? (60%) How to exract specified strings started with www from text file? (59%) How to batch extract specified lines from a text file? (59%) How to batch extract specified words from one txt file with specified name? (58%) |
Check Demo of Advanced search and replace |
| Keywords: |
| asic price find numbers sentences remove spaces remove space sentence letters write xxx remove sentences find and replace find and replace all numbers in a text file find and replace all numbers replace all numbers in txt file replace sentences remove all numbers remove text numbers remove spaces file |