optimize rewrite, allow to use ,  ... to replace the matched content.