Decouple RegEx from request object. Add unit tests. Simplify highlighting.