Trying a regex approach, had a matrix implemented and working but was unable to handle certain combinations of keywords and whitespace