Add support for replace on regular expression