I can search for a word in a string with regex as follows:



Pattern p = Pattern.compile(regex);
Matcher m = p.matcher(toCheck);
flag = m.find();


where regex is a...