I've made some progress
I've made some progress...
ereg_replace('([. ])cat([, ])', '\1mouse\2', $string);
the two [ ] contain either a dot or comma and a space
1: "a cat box" gives "a mouse box" - OK
2: "a cat, box" -> "a cat, box" - STILL NOT RIGHT
3: "a x.cat box" -> "a x.mouse box" - OK
4...