Commas at end of paragraphs
Provided your comma is at end of a paragraph, i.e. not followed by a linebreak created with Shift+Enter, use the following regular expression:
,$
= comma (your target) and dollar which is a descriptor for end-of-paragraph
The replace string is only a full stop.
Commas followed by a linebreak
In this case the regular expression is ,\n
= comma and \n
which is a descriptor for a linebreak
Commas before an asterisk
The regular expression is ,\*
where the asterisk is escaped with a reverse solidus otherwise it means repeat 0 or more times the previous character. Your replace string is .*
= full stop and asterisk. If you don’t want to keep the asterisk, just omit it in the replace string.