I split the string into regex. The resulting array contains empty lines where the regular expression matches. I do not want these. For example.
iex(1)> String.split("Hello world. How are you?", ~r/\W/) ["Hello", "world", "", "How", "are", "you", ""]
How can I split a string so that it does not return empty strings in a list?
elixir
Rodney folz
source share