I have a string like this:
This is a sentence.n This is sentence 2.nnnnnn This is sentence 3.nn And here is the final sentence.
What I want to is:
This is a sentence.n This is sentence 2.n This is sentence 3.n And here is the final sentence.
I want to remove all duplicated n characters from a string but keep only one left, is it possible to do like that in javascript ?