I need to be able to edit a string in Matlab so that it only contains letters a-z.
If I have the words
I want to be able to edit this list so that the only words I get are
Currently, the way I am editing the words is using regexp() as shown below.
pat = '[\s\.\]\[\&\%\#\*\,\$\_\ ,;:-''"?!/()@=><]+';
words = regexp(st,pat,'split');
words = lower(words);
This method works well for removing quite a bit of the symbols that I don't want but there has been a few exceptions, including the ones I listed above, that I want to remove.