fix issue 10913 @safety of std.regex replace API