added support for regex replace