So one simple way to solve the scala and excel issue is just to match for the space at the end or punctuation. So search for "scala " and "scala." instead of "scala". Same for "excel " and "excel."
In fact you could just combine them all into word + end where end can be [" ", ".", "!", "\n" etc]