fix issue 10913, constraints in std.regex.replace