rewrite regex