Notepad++ adding commas to the end of words

notepadregex

I want to add commas to the end of words but the problem is some of the words have more than one word in it for example:

Accent Colors
Anti-Social Protagonist

I have a list of the words i would like commas behind (5,000 words).

I'll be adding a small list of words to notepad++ each time and its a pain to put a comma behind each one.

So for example:

Appearance Different from Personality Art Students Youkai 14th Century Afraid of Being Hated

would turn into

Appearance Different from Personality, Art Students, Youkai, 14th Century, Afraid of Being Hated,

Best Answer

Using Replace dialog:

  • Find what: \b(word1|word2|word3)\b

  • Replace with: \1,

  • Search mode: Regular Expression

Limitation: "Find what" can have up to 2000 characters, so you will need more passes, for example doing your 5000 words in 25 groups of 200.