Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

263.Advanced search and replace -- How to remove/delete all lines ending by a comma(,) in a text file?

User: editor -- 2008-09-01          << 262  264 >>
Hits: 575
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to remove all lines ending by a comma(,) in a text file?
Input Sample:
1 Tom,
2 Jenny,100
3 Mike,28
4 John,
5 Mary,33
Output Sample:
2 Jenny,100
3 Mike,28
5 Mary,33
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open text file
2. ctrl-h open "Replace" dialog
* set "Replace Unit" to "Line"
* set "Search for pattern" to:

* set "Replace with pattern" to nothing
3. Click "Replace", done!

Note: ,\s*$ is regular expression, means lines ended by a comma with only spaces followed.
Download Script:  scripts/263.rst.zip

Screenshot 1:  Replace_Window


Similar Examples:
How to remove/delete all blank lines in a text file? (76%)
How to remove/delete all symbols in a text file? (73%)
How to remove/delete all single-byte characters in a text file (71%)
How to remove/delete all multi-byte characters in a text file? (71%)
How to remove/delete all lines with even line number? (68%)
How to remove/delete all characters except number and spaces in a text file? (68%)
How to remove/delete all lines with even line number? (68%)
How to remove/delete all English characters/letters in a text file? (68%)

Check Demo of Advanced search and replace
Keywords:
delete all lines  spaces  space  comma  remove all line  regular expression  delet  delete  dele  expression  regular expression replace spaces comma  remove a lines with a regular  remove comma  remove spaces  remove lines all  only search text  replace with pattern regular expression  replace comma