User: Dilip -- 2019-02-16 << 1434 1436 >> |
Hits: 2485 |
Type: Advanced search and replace |
Search all Advanced search and replace examples |
Description: |
In a line, search for a specific regex with words but do not match words the dictionary (case insensitive) and tag the numerics alone &100 cotton in a &99 audi &77 linen in a &200 benz &2000 COTTTON in &10 summer Words in dictionary is in this format (lowercase): cotton linen wool |
Input Sample: |
&100 cotton in a &99 audi &77 linen in a &200 benz &2000 COTTON in &10 summer &2000 Wool in &10 summer |
Output Sample: |
@100 cotton in a <item>99</item> audi @77 linen in a <item>200</item> benz @2000 COTTON in <item>10</item> summer @2000 Wool in <item>10</item> summer |
Answer: |
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
Assume dictionary file is d:\test\words.txt 1. ctrl-o open source text file 2. ctrl-h open 'replace' dialog * set 'search for pattern' to: * set 'replace with pattern' to: - click 'advanced' tab: * set 'run following at the beginning of replace' to: * set 'run following for each matched unit' to: 3. click 'replace', done. Note: please use double backslash \\ as folder delimiter such as: d:\\test\\words.txt |
Screenshot 1: Replace_Window |
Screenshot 2: Replace_Advanced_Window |