Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

669.Advanced search and replace -- How to replace the first 3 spaces into comma in each line of text?

User: editor -- 2010-12-02          << 668  670 >>
Hits: 381
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to replace the first 3 spaces into comma in each line of text?
Input Sample:
0 36 m This is person 1
1 25 f This is person 2
3 18 m This is person 3
Output Sample:
0,36,m,This is person 1
1,25,f,This is person 2
3,18,m,This is person 3
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
* set 'replace unit' to 'Chars'
* set 'replace scope' to 'Line'
* set 'unit number filter' to:

* set 'search for pattern' to a single space
* set 'replace with pattern' to a single comma
3. click 'Replace', done.
4. ctrl-s save to file.

Screenshot 1:  Replace_Window


Similar Examples:
How to replace specific spaces into comma in each line of text file? (85%)
How to remove the first 10 characters of each line in text file? (68%)
How to delete the first word in each line in a text file? (65%)
How to remove everything after the first comma in each line in a text file? (64%)
How to extract the text between first comma and second comma in each line? (63%)
How to replace each xxx with the first word in the same line in text file? (61%)
How to replace the first 3 characters of each line to fixed characters and add 'a' at the end? (61%)
How to remove leading spaces and tabs in each line in multiple text files? (60%)

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