Escape regex in substitution.