Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

467.Advanced search and replace -- How to replace specific spaces into comma in each line of text file?

User: editor -- 2010-04-04          << 466  468 >>
Hits: 391
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" on windows platform 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

Screenshot 1:  Replace_Window


Similar Examples:
How to replace the first 3 spaces into comma in each line of text? (85%)
How to count the occurrance of specific pattern in each line of text file? (72%)
How to remove leading spaces and tabs in each line in multiple text files? (68%)
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 extract all specified date format from a text file? (62%)
How to calculate md5 hex value of each line of text file? (62%)

Check Demo of Advanced search and replace
Keywords:
single space  occurrance  specific  spaces  unit number filter  space  number filter  comma  single  replace scope  replace specific comma  space comma  replace space with comma  replace with specific  specific line  scope filter  replace space in text file  replace space in text