# System.Text.RegularExpressions

``` diff
 namespace System.Text.RegularExpressions {
     public class Regex : ISerializable {
-        protected Regex(SerializationInfo info, StreamingContext context);
+        [EditorBrowsableAttribute(EditorBrowsableState.Never)]
+        [ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
+        protected Regex(SerializationInfo info, StreamingContext context);
-        protected void InitializeReferences();
+        [EditorBrowsableAttribute(EditorBrowsableState.Never)]
+        [ObsoleteAttribute("This API supports obsolete mechanisms for Regex extensibility. It is not supported.", DiagnosticId="SYSLIB0052", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
+        protected void InitializeReferences();
-        protected bool UseOptionC();
+        [EditorBrowsableAttribute(EditorBrowsableState.Never)]
+        [ObsoleteAttribute("This API supports obsolete mechanisms for Regex extensibility. It is not supported.", DiagnosticId="SYSLIB0052", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
+        protected bool UseOptionC();
-        protected internal bool UseOptionR();
+        [EditorBrowsableAttribute(EditorBrowsableState.Never)]
+        [ObsoleteAttribute("This API supports obsolete mechanisms for Regex extensibility. It is not supported.", DiagnosticId="SYSLIB0052", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
+        protected bool UseOptionR();
     }
     public class RegexMatchTimeoutException : TimeoutException, ISerializable {
-        protected RegexMatchTimeoutException(SerializationInfo info, StreamingContext context);
+        [EditorBrowsableAttribute(EditorBrowsableState.Never)]
+        [ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
+        protected RegexMatchTimeoutException(SerializationInfo info, StreamingContext context);
     }
     public sealed class RegexParseException : ArgumentException {
-        public override void GetObjectData(SerializationInfo info, StreamingContext context);
+        [EditorBrowsableAttribute(EditorBrowsableState.Never)]
+        [ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
+        public override void GetObjectData(SerializationInfo info, StreamingContext context);
     }
-    public abstract class RegexRunner {
+    [EditorBrowsableAttribute(EditorBrowsableState.Never)]
+    public abstract class RegexRunner {
-        protected static bool CharInClass(char ch, string charClass);
+        public static bool CharInClass(char ch, string charClass);
-        protected static bool CharInSet(char ch, string @set, string category);
+        [ObsoleteAttribute("This API supports obsolete mechanisms for Regex extensibility. It is not supported.", DiagnosticId="SYSLIB0052", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
+        protected static bool CharInSet(char ch, string @set, string category);
-        protected internal Match? Scan(Regex regex, string text, int textbeg, int textend, int textstart, int prevlen, bool quick);
+        [ObsoleteAttribute("This API supports obsolete mechanisms for Regex extensibility. It is not supported.", DiagnosticId="SYSLIB0052", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
+        protected internal Match? Scan(Regex regex, string text, int textbeg, int textend, int textstart, int prevlen, bool quick);
-        protected internal Match? Scan(Regex regex, string text, int textbeg, int textend, int textstart, int prevlen, bool quick, TimeSpan timeout);
+        [ObsoleteAttribute("This API supports obsolete mechanisms for Regex extensibility. It is not supported.", DiagnosticId="SYSLIB0052", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
+        protected internal Match? Scan(Regex regex, string text, int textbeg, int textend, int textstart, int prevlen, bool quick, TimeSpan timeout);
     }
-    public abstract class RegexRunnerFactory
+    [EditorBrowsableAttribute(EditorBrowsableState.Never)]
+    public abstract class RegexRunnerFactory
 }
```

