Search code examples
notepad++

Remove single or multiple commas at the end of lines using Notepad++ regex replace


In an excel column, I have words that ends with a comma and do not want any commas at the end of the lines.

Here is an example:

Investments, 
Financial Consultant, 

How do I get rid of these commas at the end of the lines using Notepad++

End results should look like this:

Investments
Financial Consultant

Thank you.


Solution

    • Find what: ,$ or, if there are spaces after the comma: ,\h*$
    • Replace with: LEAVE EMPTY