POSIX sed doesn't understand the \w atom; use [A-Z] instead; it's also more precise.
This reduces the duplication in the individual test files.