30 points · by DeWilde · 4y ago · 4 comments
Regex myRegex = Regex.Generated(“…”)
or Regex myRegex = MyRegex()
[RegexGenerated(…)]
partial class MyRegex {}You can read the development discussion and syntax reasoning in the GitHub issue: https://github.com/dotnet/runtime/issues/44676