Fix regex escaping

This makes the provided word count script work.