At JavaScript, I was using this Regexp to replace multiple line break with one
str.replace(/(\r\n?|\n){2,}/g, '$1') but for golang I am not sure what it will be. How can I achieve this in golang?
Input:
Some string\n\n\n\n\n\nFoo bar Step1:\n\nFoo bar Step2:\n\n\nFoo bar final
Output
Some string\nFoo bar Step1:\nFoo bar Step2:\nFoo bar final