| User: editor -- 2008-05-29 << 163 165 >> |
| Hits: 423 |
| Type: Advanced search and replace |
| Search all Advanced search and replace examples |
| Description: |
| How to add one space before each digit of number in a text file, but ignore other letters? |
| Input Sample: |
| 0123456789 abcde dfdfdd 234567844 2222222222 www |
| Output Sample: |
| 0 1 2 3 4 5 6 7 8 9 abcde dfdfdd 2 3 4 5 6 7 8 4 4 2 2 2 2 2 2 2 2 2 2 www |
| Answer: |
| Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
| It's quite easy! 1. ctrl-o open source file. 2. ctrl-h open 'Replace' dialog, in 'Replace' window, * fill in 'Search for Pattern': Note: \d means one digit * fill in 'Replace with Pattern': Note: ' $match' means add a space before each found digit. 3. click 'Replace', finish. |
| Download Script: scripts/164.rst.zip |
Screenshot 1: Replace_Window |
Similar Examples: |
| How to add line_no before each line of a text file? (60%) How to add a single space after each character in a text file? (59%) How to add spaces to align text to the center in a text file? (56%) How to replace all the numbers in a text file to the square value? (55%) How to replace all digits into a random digit, but keep other letters in a text file? (55%) How to remove the sequence number before each line of text file? (54%) How to convert each line of a text file to the new format? (54%) How to add SH before each number, and remove/delete quota "'"? (54%) |
Check Demo of Advanced search and replace |
| Keywords: |
| space before found letters digit dig before ignore letter space fin add letters replace add space add space replace letters add text before add before replace digit number match add |