Perl
regular expressions.
In case that you want to process each word:
$_ = "aaa bbb ccc";
@words = $_ =~ /(\w+)/g;
# now the array "words" contains each word
Update: you use
^[^\d+]+ - in Perl this is the same, but this regexp does not capture the words.
Don't you mean
(\w+)?