String.split("Freude schöner Götterfunken") would be preferred since it will use the Unicode word break algorithm which is much more flexible than breaking on an ASCII space character.
Divides a string into substrings at each Unicode whitespace occurrence with leading and trailing whitespace ignored. Groups of whitespace are treated as a single occurrence. Divisions do not occur on non-breaking whitespace.
My requirement was I have to split a string on spaces discarding all the symbols except a few special characters like a ‘-’ , after lot of trial and errors the below regex solves it ,
This is a great forum and hope it will help someone in need
Thanks again for the help , I come from Java and have started on elixir , you can imagine the pain its a whole new world for me , will post questions if any .