How to replace new Regex(...) with the [GeneratedRegex] source generator in .NET 11
A complete guide to converting new Regex(pattern, RegexOptions.Compiled) into [GeneratedRegex] in .NET 11: the mechanical rewrite, partial methods vs partial properties, measured startup and throughput numbers, the SYSLIB1040-1045 diagnostics, and the two patterns where the generator silently falls back to a cached Regex.