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
privatestaticreadonlyRegex_regex=new(@"[`~!@#\$%\^&*\(\)_\+\-={}\|\[\]\\:"";'<>\?,\./№ ]+");Expected behavior
[GeneratedRegex(@"[`~!@#\$%\^&*\(\)_\+\-={}\|\[\]\\:"";'<>\?,\./№ ]+")]privatestaticpartialRegexMyRegex();Actual behavior
[GeneratedRegex("[`~!@#\\$%\\^&*\\(\\)_\\+\\-={}\\|\\[\\]\\\\:\";'<>\\?,\\./№ ]+")]privatestaticpartialRegexMyRegex();Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
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
SYSLIB1045refactoring replaces verbatim strings with regular strings.Reproduction Steps
Expected behavior
Actual behavior
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response