Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

281.Advanced search and replace -- How to delete all text after the second comma in each line?

User: editor -- 2008-10-14          << 280  282 >>
Hits: 2072
Type: Advanced search and replace   
Search all Advanced search and replace examples
How to delete all text after the second comma in each line?
Input Sample:
a1,a2,a3,a4 ... 
b1,b2,b3,b4 ...
c01,c02,c03,c04 ...
Output Sample:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open source file.     
2. ctrl-h open 'Replace' dialog,     
in 'Replace' window,
* set 'Replace Unit' to 'Line'
* fill in 'Replace with Pattern': 
3. click 'Replace', finish.   

Notes: words($match,1,2,",",",") means take word1 and word2 from $match. Use "," as input delimiter and output delimiter.
Download Script:  scripts/

Screenshot 1:  Replace_Window

Similar Examples:
How to extract the text between first comma and second comma in each line? (69%)
How to remove/delete the text from the '#' to the end in each line? (68%)
How to remove all hyphens after the first tab in each line? (67%)
How to add a komma (,) after first and second words in each line? (66%)
How to extract text from 'start' to 'end' in each line? (66%)
How to batch split file delimitered by second comma in each line? (65%)
How to sort the text by the number of specific word in each line? (64%)
How to limit a text file to less than 40 chars each line? (63%)

Check Demo of Advanced search and replace
delete all text  delimiter  delete all  second  comma  after  input  how to delete  delete  delet  delete line after comma  delete all text after comma  text input delete after comma  delete line after 3 comma  text search second comma  delete comma line  delete line comma  delete line after