add ability to use capture groups in replace argument