I'm trying to split some text either by whitespace and/or new line, and also remove the white space before and after the whole text, just in case. I'm not sure how to perform this as I cannot get my head around regex (I've tried other people's regex but it breaks my output) and I want to perform this using best practice rather than writing some lengthy buggy workaround
My code can be located here: https://github.com/Dave-Melia/Text-Separator
Many thanks
D