Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

923.Regular expression replace -- How to remove everything after the first comma in each line in a text file?

User: Simon -- 2012-02-21          << 922  924 >>
Hits: 15829
Type: Regular expression replace   
Search all Regular expression replace examples
Description:
How to remove everything in a text file after first comma in each line without deleting first coma?
Input Sample:
word1,word2,word3,word,word5,
Output Sample:
word1,
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 'search for pattern' to:

* set 'replace with pattern' to:

3. click 'replace', done.

Screenshot 1:  Replace_Window


Similar Examples:
How to remove everything from start of line to the first comma in each line? (80%)
How to remove everything before first space in each line? (75%)
How to remove everything after specified strings in text files? (75%)
How to delete the first word in each line in a text file? (74%)
How to remove every other characters on each line of text? (72%)
How to remove the first 10 characters of each line in text file? (72%)
How to remove everything before first space in filename? (70%)
How to remove leading spaces and tabs in each line in multiple text files? (69%)

Check Demo of Regular expression replace
Keywords:
everything after  remove everything after  remove everything  without  comma  after  every  delet  dele  regular expression  remove text after comma  remove everything after first comma  remove everything after comma  remove after comma  text remove everything after  remove first comma in a line  text file remove everything after  remove first comma