Clone and modify a RegExp instance