classify words and non-words with regex