| User: editor -- 2010-04-04 |
| Hits: 112 |
| Type: Advanced search and replace |
| Search all Advanced search and replace examples |
| Description: |
| How to replace specific spaces into comma in each line of text file? I want to replace the 1,6,8 occurrance of spaces into comma(,) in each line of text file, how to finish it with replace pioneer? |
| Input Sample: |
| 01320008 N F3 F4 F5 F6 F7 F8 F9 F10 01320009 E F3 F4 F5 F6 F7 F8 F9 F10 01320010 W F3 F4 F5 F6 F7 F8 F9 F10 ... |
| Output Sample: |
| 01320008,N F3 F4 F5 F6,F7 F8,F9 F10 01320009,E F3 F4 F5 F6,F7 F8,F9 F10 01320010,W F3 F4 F5 F6,F7 F8,F9 F10 ... |
| 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 dialog * set 'replace unit' to 'Chars' * set 'replace scope' to 'Lines' * fill 'unit number filter' to: * fill 'search for pattern' with one single space * fill 'replace with pattern' with on single comma(,) 3. click 'Replace', done! |
| Download Script: scripts/467.rst.zip |
Similar Examples: |
| How to count the occurrance of specific pattern in each line of text file? (72%) How to replace all consecutive spaces and tabs into one single comma in text file? (67%) How to replace the second character of every line to 4 in a text file? (65%) How to delete the first word in each line in a text file? (64%) How to insert a line after specific lines in a text file? (60%) How to batch extract specified lines from a text file? (60%) Replace first char of each line to upper case (60%) How to duplicate each line 5 times in a text file? (59%) |
Check Demo of Advanced search and replace |