We have an onboarding form for new employees with multiple newlines (4-5 between lines) that need stripped. I want to get rid of the extra newlines but still space out the
We can tidy up the regex as follows:
text = text.replace(/[\r\n]{2,}/g, "\n");