I\'m trying to run a regexp in php (preg_match_all) that matches certain whole words in a string, but problem is that it also matches words that contain only pa
preg_match_all
You don't want a character class with [], you just want to match the words:
[]
/testable|string/