I created a regex to get rid of spaces, tabs, new lines, etc.
(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+
My issue is that it matches some spaces and some new lines, not all of them. Why is that?
I have tried:
(^[\r\n]*|[\r\n]+)[\s\t+]*[\r\n]+
but still doesn't seem to match multiple spaces