Description
It is quite common to use verbatim strings to declare regex as it could contain a lot of escape sequences and with regular strings it looks like back-slach circus.
Currently SYSLIB1045 refactoring replaces verbatim strings with regular strings.
Reproduction Steps
private static readonly Regex _regex = new(@"[`~!@#\$%\^&*\(\)_\+\-={}\|\[\]\\:"";'<>\?,\./№ ]+");
Expected behavior
[GeneratedRegex(@"[`~!@#\$%\^&*\(\)_\+\-={}\|\[\]\\:"";'<>\?,\./№ ]+")]
private static partial Regex MyRegex();
Actual behavior
[GeneratedRegex("[`~!@#\\$%\\^&*\\(\\)_\\+\\-={}\\|\\[\\]\\\\:\";'<>\\?,\\./№ ]+")]
private static partial Regex MyRegex();
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response