# System.Text.RegularExpressions

``` diff
 namespace System.Text.RegularExpressions {
+    public sealed class GeneratedRegexAttribute : Attribute {
+        public GeneratedRegexAttribute([StringSyntaxAttribute("Regex")] string pattern);
+        public GeneratedRegexAttribute([StringSyntaxAttribute("Regex", new object[]{ "options"})] string pattern, RegexOptions options);
+        public GeneratedRegexAttribute([StringSyntaxAttribute("Regex", new object[]{ "options"})] string pattern, RegexOptions options, int matchTimeoutMilliseconds);
+        public GeneratedRegexAttribute([StringSyntaxAttribute("Regex", new object[]{ "options"})] string pattern, RegexOptions options, int matchTimeoutMilliseconds, string cultureName);
+        public GeneratedRegexAttribute([StringSyntaxAttribute("Regex", new object[]{ "options"})] string pattern, RegexOptions options, string cultureName);
+        public string CultureName { get; }
+        public int MatchTimeoutMilliseconds { get; }
+        public RegexOptions Options { get; }
+        public string Pattern { get; }
+    }
     public class Regex : ISerializable {
-        [ObsoleteAttribute("Regex.CompileToAssembly is obsolete and not supported. Use the RegexGeneratorAttribute with the regular expression source generator instead.", DiagnosticId="SYSLIB0036", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
-        public static void CompileToAssembly(RegexCompilationInfo[] regexinfos, AssemblyName assemblyname);
+        [ObsoleteAttribute("Regex.CompileToAssembly is obsolete and not supported. Use the GeneratedRegexAttribute with the regular expression source generator instead.", DiagnosticId="SYSLIB0036", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
+        public static void CompileToAssembly(RegexCompilationInfo[] regexinfos, AssemblyName assemblyname);
-        [ObsoleteAttribute("Regex.CompileToAssembly is obsolete and not supported. Use the RegexGeneratorAttribute with the regular expression source generator instead.", DiagnosticId="SYSLIB0036", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
-        public static void CompileToAssembly(RegexCompilationInfo[] regexinfos, AssemblyName assemblyname, CustomAttributeBuilder[]? attributes);
+        [ObsoleteAttribute("Regex.CompileToAssembly is obsolete and not supported. Use the GeneratedRegexAttribute with the regular expression source generator instead.", DiagnosticId="SYSLIB0036", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
+        public static void CompileToAssembly(RegexCompilationInfo[] regexinfos, AssemblyName assemblyname, CustomAttributeBuilder[]? attributes);
-        [ObsoleteAttribute("Regex.CompileToAssembly is obsolete and not supported. Use the RegexGeneratorAttribute with the regular expression source generator instead.", DiagnosticId="SYSLIB0036", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
-        public static void CompileToAssembly(RegexCompilationInfo[] regexinfos, AssemblyName assemblyname, CustomAttributeBuilder[]? attributes, string? resourceFile);
+        [ObsoleteAttribute("Regex.CompileToAssembly is obsolete and not supported. Use the GeneratedRegexAttribute with the regular expression source generator instead.", DiagnosticId="SYSLIB0036", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
+        public static void CompileToAssembly(RegexCompilationInfo[] regexinfos, AssemblyName assemblyname, CustomAttributeBuilder[]? attributes, string? resourceFile);
     }
-    [ObsoleteAttribute("Regex.CompileToAssembly is obsolete and not supported. Use the RegexGeneratorAttribute with the regular expression source generator instead.", DiagnosticId="SYSLIB0036", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
-    public class RegexCompilationInfo
+    [ObsoleteAttribute("Regex.CompileToAssembly is obsolete and not supported. Use the GeneratedRegexAttribute with the regular expression source generator instead.", DiagnosticId="SYSLIB0036", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
+    public class RegexCompilationInfo
-    public sealed class RegexGeneratorAttribute : Attribute {
-        public RegexGeneratorAttribute([StringSyntaxAttribute("Regex")] string pattern);
-        public RegexGeneratorAttribute([StringSyntaxAttribute("Regex", new object[]{ "options"})] string pattern, RegexOptions options);
-        public RegexGeneratorAttribute([StringSyntaxAttribute("Regex", new object[]{ "options"})] string pattern, RegexOptions options, int matchTimeoutMilliseconds);
-        public int MatchTimeoutMilliseconds { get; }
-        public RegexOptions Options { get; }
-        public string Pattern { get; }
-    }
 }
```

