rewrite some regexp