Modified
This will split texts by non-word characters, e.g. - , . etc.
The code is otherwise self explaining.