96 types derived from Regex
aspire (18)
Aspire.Azure.Storage.Blobs (1)
Aspire.Azure.Storage.Queues (1)
Aspire.Confluent.Kafka.Tests (1)
Aspire.Dashboard (7)
Aspire.EndToEnd.Tests (1)
Aspire.Hosting (5)
Aspire.Hosting.Azure (1)
Aspire.Hosting.Azure.KeyVault (1)
Aspire.Hosting.DevTunnels (1)
Aspire.Hosting.Python (1)
Aspire.Hosting.SqlServer (1)
Aspire.Templates.Tests (1)
BuildActionTelemetryTable (1)
ConfigurationSchemaGenerator (1)
ConfigurationSchemaGenerator.Tests (1)
dotnet-dev-certs (3)
illink (2)
Microsoft.AspNetCore.Authentication.Negotiate (1)
Microsoft.AspNetCore.Components (1)
Microsoft.AspNetCore.DeveloperCertificates.XPlat (3)
Microsoft.AspNetCore.Routing (1)
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Microsoft.CodeAnalysis (2)
Microsoft.ML.Tokenizers (6)
System.ComponentModel.TypeConverter (2)
System.Data.Common (2)
System.Data.Odbc (5)
System.Private.DataContractSerialization (2)
System.Private.Xml (2)
System.Text.Json (2)
System.Windows.Forms (1)
System.Windows.Forms.Design (1)
System.Windows.Forms.Tests (1)
Templates.Blazor.Tests (3)
Templates.Blazor.WebAssembly.Auth.Tests (3)
Templates.Blazor.WebAssembly.Tests (3)
Templates.Mvc.Tests (3)
Templates.Tests (3)
527 instantiations of Regex
AnalyzerRunner (1)
aspire (3)
Aspire.Dashboard (2)
Aspire.Dashboard.Tests (1)
Aspire.EndToEnd.Tests (2)
Aspire.Microsoft.Data.SqlClient (2)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (2)
Aspire.Playground.Tests (1)
Aspire.Templates.Tests (2)
BuildBoss (1)
CSharpSyntaxGenerator (1)
dotnet (34)
Commands\Test\MTP\Terminal\AnsiDetector.cs (17)
20new("^xterm"), // xterm, PuTTY, Mintty
21new("^rxvt"), // RXVT
22new("^(?!eterm-color).*eterm.*"), // Accepts eterm, but not eterm-color, which does not support moving the cursor, see #9950.
23new("^screen"), // GNU screen, tmux
24new("tmux"), // tmux
25new("^vt100"), // DEC VT series
26new("^vt102"), // DEC VT series
27new("^vt220"), // DEC VT series
28new("^vt320"), // DEC VT series
29new("ansi"), // ANSI
30new("scoansi"), // SCO ANSI
31new("cygwin"), // Cygwin, MinGW
32new("linux"), // Linux console
33new("konsole"), // Konsole
34new("bvterm"), // Bitvise SSH Client
35new("^st-256color"), // Suckless Simple Terminal, st
36new("alacritty"), // Alacritty
Commands\Test\VSTest\TestCommand.cs (17)
645new("^xterm"), // xterm, PuTTY, Mintty
646new("^rxvt"), // RXVT
647new("^(?!eterm-color).*eterm.*"), // Accepts eterm, but not eterm-color, which does not support moving the cursor, see #9950.
648new("^screen"), // GNU screen, tmux
649new("tmux"), // tmux
650new("^vt100"), // DEC VT series
651new("^vt102"), // DEC VT series
652new("^vt220"), // DEC VT series
653new("^vt320"), // DEC VT series
654new("ansi"), // ANSI
655new("scoansi"), // SCO ANSI
656new("cygwin"), // Cygwin, MinGW
657new("linux"), // Linux console
658new("konsole"), // Konsole
659new("bvterm"), // Bitvise SSH Client
660new("^st-256color"), // Suckless Simple Terminal, st
661new("alacritty"), // Alacritty
dotnet-format.UnitTests (4)
dotnet-svcutil-lib (9)
dotnet-watch.Tests (6)
IIS.FunctionalTests (4)
IIS.LongTests (2)
IIS.NewHandler.FunctionalTests (2)
IIS.NewShim.FunctionalTests (2)
IIS.ShadowCopy.Tests (1)
IISExpress.FunctionalTests (4)
illink (1)
installer.tasks (1)
InteropTests (1)
Metrics (6)
Metrics.Legacy (6)
Microsoft.AspNetCore.App.Analyzers (1)
Microsoft.AspNetCore.App.Analyzers.Test (1)
Microsoft.AspNetCore.Components (1)
Microsoft.AspNetCore.Components.Endpoints.Tests (3)
Microsoft.AspNetCore.Components.WebAssembly.Server (3)
Microsoft.AspNetCore.Components.WebView.Maui (1)
Microsoft.AspNetCore.Components.WebView.WindowsForms (1)
Microsoft.AspNetCore.Components.WebView.Wpf (1)
Microsoft.AspNetCore.Grpc.JsonTranscoding (2)
Microsoft.AspNetCore.Grpc.Swagger (2)
Microsoft.AspNetCore.InternalTesting.Tests (4)
Microsoft.AspNetCore.Rewrite (9)
ApacheModRewrite\RuleBuilder.cs (4)
68match = new RegexMatch(new Regex(input.Operand, RegexOptions.CultureInvariant | RegexOptions.Compiled | RegexOptions.IgnoreCase, _regexTimeout), input.Invert);
72match = new RegexMatch(new Regex(input.Operand, RegexOptions.CultureInvariant | RegexOptions.Compiled, _regexTimeout), input.Invert);
165_match = new RegexMatch(new Regex(input.Operand, RegexOptions.CultureInvariant | RegexOptions.Compiled | RegexOptions.IgnoreCase, _regexTimeout), input.Invert);
169_match = new RegexMatch(new Regex(input.Operand, RegexOptions.CultureInvariant | RegexOptions.Compiled, _regexTimeout), input.Invert);
Microsoft.AspNetCore.Rewrite.Tests (3)
Microsoft.AspNetCore.Routing (1)
Microsoft.AspNetCore.Routing.Tests (3)
Microsoft.AspNetCore.Server.IntegrationTesting (1)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (1)
Microsoft.AspNetCore.SpaServices.Extensions (4)
Microsoft.Build (26)
Microsoft.Build.BuildCheck.UnitTests (1)
Microsoft.Build.CommandLine.UnitTests (1)
Microsoft.Build.Engine.UnitTests (10)
Microsoft.Build.Framework (17)
Logging\AnsiDetector.cs (17)
18new("^xterm"), // xterm, PuTTY, Mintty
19new("^rxvt"), // RXVT
20new("^(?!eterm-color).*eterm.*"), // Accepts eterm, but not eterm-color, which does not support moving the cursor, see #9950.
21new("^screen"), // GNU screen, tmux
22new("tmux"), // tmux
23new("^vt100"), // DEC VT series
24new("^vt102"), // DEC VT series
25new("^vt220"), // DEC VT series
26new("^vt320"), // DEC VT series
27new("ansi"), // ANSI
28new("scoansi"), // SCO ANSI
29new("cygwin"), // Cygwin, MinGW
30new("linux"), // Linux console
31new("konsole"), // Konsole
32new("bvterm"), // Bitvise SSH Client
33new("^st-256color"), // Suckless Simple Terminal, st
34new("alacritty"), // Alacritty
Microsoft.Build.Tasks.CodeAnalysis (7)
Microsoft.Build.Tasks.CodeAnalysis.Sdk (7)
Microsoft.Build.Tasks.Core (3)
AssemblyDependency\AssemblyFoldersFromConfig\AssemblyFoldersFromConfigResolver.cs (1)
27() => new Regex(
Microsoft.Build.Tasks.UnitTests (1)
Microsoft.Build.Utilities.Core (12)
Microsoft.Build.Utilities.UnitTests (1)
Microsoft.Cci.Extensions (1)
Microsoft.CodeAnalysis (2)
Microsoft.CodeAnalysis.Analyzers (6)
Microsoft.CodeAnalysis.AnalyzerUtilities (6)
Microsoft.CodeAnalysis.BannedApiAnalyzers (6)
Microsoft.CodeAnalysis.CodeStyle (8)
Microsoft.CodeAnalysis.CSharp (1)
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ResultProvider (1)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Microsoft.CodeAnalysis.EditorFeatures (4)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (1)
Microsoft.CodeAnalysis.Features (9)
EmbeddedLanguages\Json\JsonParser.StrictSyntaxChecker.cs (1)
208new(
Microsoft.CodeAnalysis.Features.Test.Utilities (4)
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (6)
Microsoft.CodeAnalysis.PublicApiAnalyzers (6)
Microsoft.CodeAnalysis.ResxSourceGenerator (8)
Microsoft.CodeAnalysis.Test.Utilities (6)
Microsoft.CodeAnalysis.Workspaces (8)
Microsoft.Data.Analysis (3)
Microsoft.Data.Analysis.Interactive.Tests (1)
Microsoft.Data.Analysis.Tests (3)
Microsoft.DotNet.ApiCompat.Task (1)
Microsoft.DotNet.ApiCompat.Tests (1)
Microsoft.DotNet.ApiCompat.Tool (1)
Microsoft.DotNet.Arcade.Sdk (2)
Microsoft.DotNet.Build.Tasks.Feed (3)
Microsoft.DotNet.Build.Tasks.Installers (1)
Microsoft.DotNet.Git.IssueManager (3)
Microsoft.DotNet.Helix.JobSender (3)
Microsoft.DotNet.Helix.Sdk (1)
Microsoft.DotNet.SourceBuild.Tasks (4)
Microsoft.DotNet.VersionTools.Tasks (3)
Microsoft.DotNet.XUnitAssert.Tests (7)
StringAssertsTests.cs (7)
309 Assert.Throws<MatchesException>(() => Assert.Matches(new Regex(@"\w+"), null));
315 Assert.Matches(new Regex(@"\w+"), "Hello");
321 Assert.Matches(new Regex(@"[a-z]+", RegexOptions.IgnoreCase), "HELLO");
327 var ex = Record.Exception(() => Assert.Matches(new Regex(@"\d+"), "Hello, world!"));
375 Assert.DoesNotMatch(new Regex(@"\w+"), null);
381 Assert.DoesNotMatch(new Regex(@"\d"), "Hello");
387 var ex = Record.Exception(() => Assert.DoesNotMatch(new Regex(@"\w"), "Hello, world!"));
Microsoft.Extensions.AI.Evaluation (2)
Microsoft.Extensions.AI.Evaluation.Console (2)
Microsoft.Extensions.AI.Evaluation.Reporting (2)
Microsoft.Extensions.AI.Evaluation.Safety (2)
Microsoft.Extensions.AI.OpenAI (1)
Microsoft.Gen.MetadataExtractor (2)
Microsoft.Gen.Metrics (3)
Microsoft.Gen.MetricsReports (2)
Microsoft.Maui.Controls (1)
Microsoft.Maui.Controls.DesignTools (2)
Microsoft.Maui.Resizetizer (1)
Microsoft.ML.Core (1)
Microsoft.ML.Core.Tests (1)
Microsoft.ML.Data (12)
Evaluators\MultiOutputRegressionEvaluator.cs (4)
82isVector: true, namePattern: new Regex(string.Format(@"{0}_(?<label>\d+)\)", L1), RegexOptions.IgnoreCase),
85isVector: true, namePattern: new Regex(string.Format(@"{0}_(?<label>\d+)\)", L2), RegexOptions.IgnoreCase),
88isVector: true, namePattern: new Regex(string.Format(@"{0}_(?<label>\d+)\)", Rms), RegexOptions.IgnoreCase),
91isVector: true, namePattern: new Regex(string.Format(@"{0}_(?<label>\d+)\)", Loss), RegexOptions.IgnoreCase),
Microsoft.ML.GenAI.LLaMA (1)
Microsoft.ML.IntegrationTests (1)
Microsoft.ML.InternalCodeAnalyzer (1)
Microsoft.ML.Predictor.Tests (1)
Microsoft.ML.ResultProcessor (4)
Microsoft.ML.TestFramework (32)
BaseTestBaseline.cs (32)
68private static readonly Regex _matchNumbers = new Regex(@"-?\b[0-9]+\.?[0-9]*(E[-+][0-9]*)?\b", RegexOptions.IgnoreCase | RegexOptions.Compiled);
301private static readonly Regex _matchDataRoot = new Regex(DataRootRegExp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
302private static readonly Regex _matchDataUnixRoot = new Regex(DataRootUnixRegExp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
303private static readonly Regex _matchSamplesRoot = new Regex(SamplesRootRegExp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
304private static readonly Regex _matchSamplesUnixRoot = new Regex(SamplesRootUnixRegExp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
305private static readonly Regex _matchSourceRoot = new Regex(SourceRootRegExp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
306private static readonly Regex _matchSourceUnixRoot = new Regex(SourceRootUnixRegExp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
307private static readonly Regex _matchTestsRoot = new Regex(TestsRootRegExp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
308private static readonly Regex _matchOutputRoot = new Regex(OutputRootRegExp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
309private static readonly Regex _matchOutputUnixRoot = new Regex(OutputRootUnixRegExp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
310private static readonly Regex _matchTL = new Regex(@"[a-z]:\\[a-z0-9_\.\\]+\\TL.exe", RegexOptions.IgnoreCase | RegexOptions.Compiled);
311private static readonly Regex _matchTempFile = new Regex(@"[a-z]:\\users\\[a-z0-9_\.]+\\appdata\\local\\temp\\[a-z0-9_\.\\]*\.tmp", RegexOptions.IgnoreCase | RegexOptions.Compiled);
312private static readonly Regex _matchTempDir = new Regex(@"[a-z]:\\users\\[a-z0-9_\.]+\\appdata\\local\\temp\\[a-z0-9_\.\\]+\\", RegexOptions.IgnoreCase | RegexOptions.Compiled);
313private static readonly Regex _matchTempUnixDir = new Regex(@"\/(var\/)?tmp" + @"\/[^\\\t ]+", RegexOptions.IgnoreCase | RegexOptions.Compiled);
314private static readonly Regex _matchTempDirServiceProfile = new Regex(@"[a-z]:\\Windows\\ServiceProfiles\\[a-z0-9_\.]+\\appdata\\local\\temp\\[a-z0-9_\.\\]+", RegexOptions.IgnoreCase | RegexOptions.Compiled);
315private static readonly Regex _matchTempWindows = new Regex(@"[a-z]:\\Windows\\Temp\\[a-z0-9_\.]+", RegexOptions.IgnoreCase | RegexOptions.Compiled);
316private static readonly Regex _matchDateTime = new Regex(@"[0-9]{1,4}[-/][0-9]{1,2}[-/][0-9]{1,4} [0-9]{1,2}:[0-9]{1,2}:[0-9]{1,4}(\.[0-9]+)?( *[AP]M)?", RegexOptions.IgnoreCase | RegexOptions.Compiled);
317private static readonly Regex _matchTime = new Regex(@"[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?", RegexOptions.Compiled);
318private static readonly Regex _matchShortTime = new Regex(@"\([0-9]{2}:[0-9]{2}(\.[0-9]+)?\)", RegexOptions.Compiled);
319private static readonly Regex _matchMemory = new Regex(@"memory usage\(MB\): [0-9]+", RegexOptions.Compiled);
320private static readonly Regex _matchReservedMemory = new Regex(@": [0-9]+ bytes", RegexOptions.Compiled);
321private static readonly Regex _matchElapsed = new Regex(@"Time elapsed\(s\): [0-9.]+", RegexOptions.Compiled);
322private static readonly Regex _matchTimes = new Regex(@"Instances caching time\(s\): [0-9\.]+", RegexOptions.Compiled);
323private static readonly Regex _matchUpdatesPerSec = new Regex(@", ([0-9\.]+|Infinity)M WeightUpdates/sec", RegexOptions.Compiled);
324private static readonly Regex _matchParameterT = new Regex(@"=PARAM:/t:[0-9]+", RegexOptions.Compiled);
325private static readonly Regex _matchInfinity = new Regex(@"\u221E", RegexOptions.Compiled);
326private static readonly Regex _matchErrorLog = new Regex(@"Error_[\w-]+\.log", RegexOptions.Compiled);
327private static readonly Regex _matchGuid = new Regex(@"[A-F0-9]{8}(?:-[A-F0-9]{4}){3}-[A-F0-9]{12}", RegexOptions.IgnoreCase | RegexOptions.Compiled);
328private static readonly Regex _matchBin = new Regex(_binRegExp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
329private static readonly Regex _matchUnixBin = new Regex(_binRegUnixExp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
330private static readonly Regex _matchBin64 = new Regex(_bin64RegExp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
331private static readonly Regex _matchUnixBin64 = new Regex(_bin64RegUnixExp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
Microsoft.ML.Tokenizers (3)
Microsoft.ML.Tokenizers.Tests (1)
Microsoft.NET.Build.Containers (15)
Microsoft.NET.Sdk.Publish.Tasks (2)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (5)
Microsoft.NET.Sdk.StaticWebAssets.Tests (1)
Microsoft.NET.TestFramework (1)
Microsoft.TemplateEngine.Cli (1)
Microsoft.VisualBasic.Core (4)
MSBuildTaskHost (17)
AnsiDetector.cs (17)
18new("^xterm"), // xterm, PuTTY, Mintty
19new("^rxvt"), // RXVT
20new("^(?!eterm-color).*eterm.*"), // Accepts eterm, but not eterm-color, which does not support moving the cursor, see #9950.
21new("^screen"), // GNU screen, tmux
22new("tmux"), // tmux
23new("^vt100"), // DEC VT series
24new("^vt102"), // DEC VT series
25new("^vt220"), // DEC VT series
26new("^vt320"), // DEC VT series
27new("ansi"), // ANSI
28new("scoansi"), // SCO ANSI
29new("cygwin"), // Cygwin, MinGW
30new("linux"), // Linux console
31new("konsole"), // Konsole
32new("bvterm"), // Bitvise SSH Client
33new("^st-256color"), // Suckless Simple Terminal, st
34new("alacritty"), // Alacritty
QuarantineTools.Tests (4)
Roslyn.Diagnostics.Analyzers (6)
Roslyn.Diagnostics.CSharp.Analyzers (1)
Roslyn.VisualStudio.Next.UnitTests (1)
RoutingSandbox (1)
RoutingWebSite (1)
sdk-tasks (2)
SemanticSearch.BuildTask (2)
SemanticSearch.BuildTask.UnitTests (8)
GenerateFilteredReferenceAssembliesTaskTests.cs (8)
115new ApiPattern(SymbolKindFlags.NamedType, new Regex(@"M\.E.*"), IsIncluded: true),
116new ApiPattern(SymbolKindFlags.NamedType, new Regex(@"M\.E`1"), IsIncluded: false));
160new ApiPattern(SymbolKindFlags.NamedType, new Regex(@".*"), IsIncluded: true),
161new ApiPattern(SymbolKindFlags.Method, new Regex(@"I.M1"), IsIncluded: false));
200new ApiPattern(SymbolKindFlags.NamedType, new Regex(@".*"), IsIncluded: true),
201new ApiPattern(SymbolKindFlags.Method, new Regex(@"C\.get_.*"), IsIncluded: false),
202new ApiPattern(SymbolKindFlags.Method, new Regex(@"C\.set_.*"), IsIncluded: false),
203new ApiPattern(SymbolKindFlags.Method, new Regex(@"C\.get_P2"), IsIncluded: true));
System.ComponentModel.Annotations (2)
System.Configuration.ConfigurationManager (1)
System.Data.Common (1)
System.Drawing.Common.Tests (1)
System.Net.WebProxy (1)
System.Private.Xml (1)
System.Text.RegularExpressions (3)
TaskUsageLogger (1)
Templates.Blazor.Tests (1)
Text.Analyzers (6)
VersioningWebSite (1)
xunit.console (1)
1860 references to Regex
AnalyzerRunner (1)
aspire (98)
Aspire.Azure.Storage.Blobs (9)
Aspire.Azure.Storage.Queues (9)
Aspire.Cli.Tests (1)
Aspire.Confluent.Kafka.Tests (9)
Aspire.Dashboard (43)
Aspire.Dashboard.Tests (5)
Aspire.EndToEnd.Tests (11)
Aspire.Hosting (32)
Aspire.Hosting.Azure (9)
Aspire.Hosting.Azure.KeyVault (9)
Aspire.Hosting.DevTunnels (10)
Aspire.Hosting.MySql.Tests (2)
Aspire.Hosting.Python (10)
Aspire.Hosting.SqlServer (9)
Aspire.Hosting.Tests (5)
Aspire.Microsoft.Data.SqlClient (2)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (2)
Aspire.Playground.Tests (1)
Aspire.Templates.Tests (15)
BuildActionTelemetryTable (10)
BuildBoss (2)
ConfigurationSchemaGenerator (9)
ConfigurationSchemaGenerator.Tests (9)
CSharpSyntaxGenerator (1)
dotnet (9)
dotnet.Tests (16)
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestsForMultipleTFMs.cs (15)
34MatchCollection previousDotnetProjectMatches = Regex.Matches(result.StdOut!, RegexPatternHelper.GenerateProjectRegexPattern("TestProject", TestingConstants.Failed, useCurrentVersion: false, configuration));
35MatchCollection currentDotnetProjectMatches = Regex.Matches(result.StdOut!, RegexPatternHelper.GenerateProjectRegexPattern("OtherTestProject", TestingConstants.Passed, useCurrentVersion: true, configuration));
37MatchCollection skippedTestsMatches = Regex.Matches(result.StdOut!, "skipped Test2");
38MatchCollection failedTestsMatches = Regex.Matches(result.StdOut!, "failed Test3");
74MatchCollection previousDotnetProjectMatches = Regex.Matches(result.StdOut!, RegexPatternHelper.GenerateProjectRegexPattern("TestProject", TestingConstants.Failed, useCurrentVersion: false, configuration));
75MatchCollection currentDotnetProjectMatches = Regex.Matches(result.StdOut!, RegexPatternHelper.GenerateProjectRegexPattern("TestProject", TestingConstants.Failed, useCurrentVersion: true, configuration));
76MatchCollection currentDotnetOtherProjectMatches = Regex.Matches(result.StdOut!, RegexPatternHelper.GenerateProjectRegexPattern("OtherTestProject", TestingConstants.Passed, useCurrentVersion: true, configuration));
78MatchCollection skippedTestsMatches = Regex.Matches(result.StdOut!, "skipped Test1");
79MatchCollection failedTestsMatches = Regex.Matches(result.StdOut!, "failed Test2");
80MatchCollection timeoutTestsMatches = Regex.Matches(result.StdOut!, @"failed \(canceled\) Test3");
81MatchCollection errorTestsMatches = Regex.Matches(result.StdOut!, "failed Test4");
82MatchCollection canceledTestsMatches = Regex.Matches(result.StdOut!, @"failed \(canceled\) Test5");
190MatchCollection previousDotnetProjectMatches = Regex.Matches(result.StdOut!, RegexPatternHelper.GenerateProjectRegexPattern("TestProject", TestingConstants.Failed, useCurrentVersion: false, configuration));
191MatchCollection currentDotnetProjectMatches = Regex.Matches(result.StdOut!, RegexPatternHelper.GenerateProjectRegexPattern("TestProject", TestingConstants.Failed, useCurrentVersion: true, configuration));
193MatchCollection failedTestsMatches = Regex.Matches(result.StdOut!, "failed TestMethod3");
dotnet-dev-certs (21)
dotnet-format.UnitTests (1)
dotnet-new.IntegrationTests (8)
dotnet-svcutil-lib (17)
dotnet-svcutil-lib.Tests (2)
dotnet-watch (6)
dotnet-watch.Tests (11)
GenerateDocumentationAndConfigFiles (7)
GetDocument.Insider (1)
IIS.FunctionalTests (8)
IIS.LongTests (6)
IIS.NewHandler.FunctionalTests (6)
IIS.NewShim.FunctionalTests (6)
IIS.ShadowCopy.Tests (5)
IISExpress.FunctionalTests (8)
illink (16)
installer.tasks (1)
InteropTests (1)
Metrics (13)
Metrics.Legacy (13)
Microsoft.AspNetCore.App.Analyzers (2)
Microsoft.AspNetCore.App.Analyzers.Test (2)
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (11)
Microsoft.AspNetCore.Authentication.Negotiate (9)
Microsoft.AspNetCore.Components (14)
Microsoft.AspNetCore.Components.Endpoints.Tests (24)
EndpointHtmlRendererTest.cs (21)
85var match = Regex.Match(content, ComponentPattern);
175var match = Regex.Match(content, PrerenderedComponentPattern, RegexOptions.Multiline);
219var match = Regex.Match(content, ComponentPattern);
257var match = Regex.Match(content, ComponentPattern);
293var match = Regex.Match(content, PrerenderedComponentPattern, RegexOptions.Multiline);
343var match = Regex.Match(content, PrerenderedComponentPattern, RegexOptions.Multiline);
402var match = Regex.Match(content, ComponentPattern);
434var match = Regex.Match(content, PrerenderedComponentPattern, RegexOptions.Multiline);
495var firstMatch = Regex.Match(firstComponent, PrerenderedComponentPattern, RegexOptions.Multiline);
499var secondMatch = Regex.Match(secondComponent, ComponentPattern);
553var match = Regex.Match(content, ComponentPattern);
592var match = Regex.Match(content, ComponentPattern);
631var match = Regex.Match(content, PrerenderedComponentPattern, RegexOptions.Multiline);
682var match = Regex.Match(content, PrerenderedComponentPattern, RegexOptions.Multiline);
1207var serverMarkerMatch = Regex.Match(lines[0], PrerenderedComponentPattern);
1208var serverNonPrerenderedMarkerMatch = Regex.Match(lines[1], ComponentPattern);
1210var webAssemblyMarkerMatch = Regex.Match(lines[2], PrerenderedComponentPattern);
1211var webAssemblyNonPrerenderedMarkerMatch = Regex.Match(lines[3], ComponentPattern);
1311var numMarkers = Regex.Matches(content, MarkerPrefix).Count;
1316var match = Regex.Match(content, PrerenderedComponentPattern, RegexOptions.Singleline);
1649var wasmOptionsMatch = Regex.Match(content, WebAssemblyOptionsPattern);
Microsoft.AspNetCore.Components.Server.Tests (2)
Microsoft.AspNetCore.Components.WebAssembly.Server (3)
Microsoft.AspNetCore.Components.WebView.Maui (1)
Microsoft.AspNetCore.Components.WebView.WindowsForms (1)
Microsoft.AspNetCore.Components.WebView.Wpf (1)
Microsoft.AspNetCore.DataProtection.Tests (5)
Microsoft.AspNetCore.DeveloperCertificates.XPlat (21)
Microsoft.AspNetCore.Grpc.JsonTranscoding (4)
Microsoft.AspNetCore.Grpc.Swagger (2)
Microsoft.AspNetCore.Http.Microbenchmarks (2)
Microsoft.AspNetCore.Identity.FunctionalTests (2)
Microsoft.AspNetCore.InternalTesting.Tests (4)
Microsoft.AspNetCore.Rewrite (8)
Microsoft.AspNetCore.Rewrite.Tests (8)
Microsoft.AspNetCore.Routing (15)
Microsoft.AspNetCore.Routing.Tests (1)
Microsoft.AspNetCore.Server.IntegrationTesting (1)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (1)
Microsoft.AspNetCore.Server.Kestrel.Core (13)
Microsoft.AspNetCore.SpaServices.Extensions (2)
Microsoft.Build (83)
Evaluation\Expander.cs (10)
3454internal static Regex ItemMetadataRegex => s_itemMetadataRegex ??=
3457internal static Regex s_itemMetadataRegex;
3489private static Regex s_nonTransformItemMetadataPattern;
3491internal static Regex NonTransformItemMetadataRegex => s_nonTransformItemMetadataPattern ??=
3516/// Copied from <see cref="Regex.Replace(string, MatchEvaluator, int, int)"/> and modified to use a <see cref="SpanBasedStringBuilder"/> rather than repeatedly allocating a <see cref="System.Text.StringBuilder"/>. This
3523/// <param name="regex">The <see cref="Regex"/> that will perform the matching.</param>
3524public static void ReplaceAndAppend(string input, Func<Match, MetadataMatchEvaluator, string> evaluator, MetadataMatchEvaluator metadataMatchEvaluator, SpanBasedStringBuilder stringBuilder, Regex regex)
3530/// Copied from <see cref="Regex.Replace(string, MatchEvaluator, int, int)"/> and modified to use a <see cref="SpanBasedStringBuilder"/> rather than repeatedly allocating a <see cref="System.Text.StringBuilder"/>. This
3539/// <param name="regex">The <see cref="Regex"/> that will perform the matching.</param>
3540public static void ReplaceAndAppend(string input, Func<Match, MetadataMatchEvaluator, string> evaluator, MetadataMatchEvaluator matchEvaluatorState, int count, int startat, SpanBasedStringBuilder stringBuilder, Regex regex)
FileMatcher.cs (8)
54private static readonly Lazy<ConcurrentDictionary<string, (Regex regex, bool needsRecursion, bool isLegalFileSpec)>> s_regexCache = new(() =>new(StringComparer.Ordinal));
754Regex regexFileMatch, // can be null
777public Regex RegexFileMatch { get; }
1497out Regex regexFileMatch,
1519out Regex regexFileMatch,
1525GetFileSpecInfoWithRegexObjectCore(spec, out var regex, out var needsRec, out var isLegal);
1849Regex regexFileMatch;
1871Regex fileSpecRegex,
Globbing\MSBuildGlob.cs (7)
34public Regex Regex { get; }
36public GlobState(string globRoot, string fileSpec, bool isLegal, string fixedDirectoryPart, string wildcardDirectoryPart, string filenamePart, bool needsRecursion, Regex regex)
50private static readonly WeakValueDictionary<string, Regex> s_regexCache = new WeakValueDictionary<string, Regex>();
57internal Regex TestOnlyRegex => _state.Value.Regex;
198Regex regex = null;
217Regex newRegex = new Regex(matchFileExpression, regexOptions);
Microsoft.Build.BuildCheck.UnitTests (12)
EndToEndTests.cs (12)
65Regex.Matches(output, "BC0201: .* Property").Count.ShouldBe(2);
66Regex.Matches(output, "BC0202: .* Property").Count.ShouldBe(2);
67Regex.Matches(output, "BC0203 .* Property").Count.ShouldBe(2);
130Regex.Matches(output.LogOutput, expectedDiagnostic).Count.ShouldBe(2);
218Regex regex = new Regex(@"(\d+) Warning\(s\)");
244Regex.Matches(output, expectedDiagnostic).Count.ShouldBe(2);
354Regex.Matches(output, "BC0202: .* Property").Count.ShouldBe(2);
355Regex.Matches(output, "BC0203: .* Property").Count.ShouldBe(38);
359Regex.Matches(output, "BC0202: .* Property").Count.ShouldBe(2);
360Regex.Matches(output, "BC0203: .* Property").Count.ShouldBe(42);
396Regex.Matches(output, expectedDiagnostic).Count.ShouldBe(2);
474Regex.Matches(output, expectedDiagnostic).Count.ShouldBe(expectCheckTrigger ? 2 : 0);
Microsoft.Build.CommandLine.UnitTests (3)
Microsoft.Build.Engine.OM.UnitTests (10)
Construction\WhiteSpacePreservation_Tests.cs (7)
451projectContents = Regex.Replace(projectContents, @"(?<!\r)\n", "\r\n", RegexOptions.Multiline);
452updatedProject = Regex.Replace(updatedProject, @"(?<!\r)\n", "\r\n", RegexOptions.Multiline);
456projectContents = Regex.Replace(projectContents, @"\r\n", "\n", RegexOptions.Multiline);
457updatedProject = Regex.Replace(updatedProject, @"\r\n", "\n", RegexOptions.Multiline);
506var crlfCount = Regex.Matches(projectResults, @"\r\n", RegexOptions.Multiline).Count;
507var nlCount = Regex.Matches(projectResults, @"\n").Count;
515Assert.Empty(Regex.Matches(projectResults, @"\r\n", RegexOptions.Multiline));
Microsoft.Build.Engine.UnitTests (16)
Microsoft.Build.Framework (2)
Microsoft.Build.Tasks.CodeAnalysis (7)
Microsoft.Build.Tasks.CodeAnalysis.Sdk (7)
Microsoft.Build.Tasks.Core (28)
FileMatcher.cs (8)
54private static readonly Lazy<ConcurrentDictionary<string, (Regex regex, bool needsRecursion, bool isLegalFileSpec)>> s_regexCache = new(() =>new(StringComparer.Ordinal));
754Regex regexFileMatch, // can be null
777public Regex RegexFileMatch { get; }
1497out Regex regexFileMatch,
1519out Regex regexFileMatch,
1525GetFileSpecInfoWithRegexObjectCore(spec, out var regex, out var needsRec, out var isLegal);
1849Regex regexFileMatch;
1871Regex fileSpecRegex,
Microsoft.Build.Tasks.UnitTests (5)
Microsoft.Build.UnitTests.Shared (5)
Microsoft.Build.Utilities.Core (32)
FileMatcher.cs (8)
54private static readonly Lazy<ConcurrentDictionary<string, (Regex regex, bool needsRecursion, bool isLegalFileSpec)>> s_regexCache = new(() =>new(StringComparer.Ordinal));
754Regex regexFileMatch, // can be null
777public Regex RegexFileMatch { get; }
1497out Regex regexFileMatch,
1519out Regex regexFileMatch,
1525GetFileSpecInfoWithRegexObjectCore(spec, out var regex, out var needsRec, out var isLegal);
1849Regex regexFileMatch;
1871Regex fileSpecRegex,
Microsoft.Build.Utilities.UnitTests (1)
Microsoft.Cci.Extensions (1)
Microsoft.CodeAnalysis (22)
Microsoft.CodeAnalysis.Analyzers (21)
Microsoft.CodeAnalysis.AnalyzerUtilities (13)
Microsoft.CodeAnalysis.BannedApiAnalyzers (13)
Microsoft.CodeAnalysis.CodeStyle (14)
Microsoft.CodeAnalysis.CSharp (1)
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ResultProvider (1)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (5)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Microsoft.CodeAnalysis.EditorFeatures (6)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (1)
Microsoft.CodeAnalysis.Features (14)
Microsoft.CodeAnalysis.Features.Test.Utilities (4)
Microsoft.CodeAnalysis.LanguageServer.Protocol (6)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Microsoft.CodeAnalysis.NetAnalyzers.UnitTests (1)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (13)
Microsoft.CodeAnalysis.PublicApiAnalyzers (13)
Microsoft.CodeAnalysis.ResxSourceGenerator (15)
Microsoft.CodeAnalysis.Test.Utilities (10)
Microsoft.CodeAnalysis.Workspaces (16)
Microsoft.Data.Analysis (7)
Microsoft.Data.Analysis.Interactive.Tests (1)
Microsoft.Data.Analysis.Tests (7)
Microsoft.DotNet.ApiCompat.Task (3)
Microsoft.DotNet.ApiCompat.Tests (3)
Microsoft.DotNet.ApiCompat.Tool (3)
Microsoft.DotNet.Arcade.Sdk (4)
Microsoft.DotNet.Build.Tasks.Feed (10)
Microsoft.DotNet.Build.Tasks.Feed.Tests (1)
Microsoft.DotNet.Build.Tasks.Installers (1)
Microsoft.DotNet.Build.Tasks.Workloads (2)
Microsoft.DotNet.Cli.Utils (1)
Microsoft.DotNet.GenAPI (1)
Microsoft.DotNet.Git.IssueManager (3)
Microsoft.DotNet.Helix.JobSender (2)
Microsoft.DotNet.Helix.Sdk (3)
Microsoft.DotNet.Helix.Sdk.Tests (3)
Microsoft.DotNet.HotReload.Client.Tests (1)
Microsoft.DotNet.Open.Api.Tools.Tests (8)
Microsoft.DotNet.SignCheckLibrary (2)
Microsoft.DotNet.SourceBuild.Tasks (4)
Microsoft.DotNet.VersionTools (2)
Microsoft.DotNet.VersionTools.Tasks (3)
Microsoft.DotNet.XUnitAssert.Tests (2)
Microsoft.Extensions.AI.Abstractions (4)
Microsoft.Extensions.AI.Evaluation (10)
Microsoft.Extensions.AI.Evaluation.Console (10)
Microsoft.Extensions.AI.Evaluation.Quality (1)
Microsoft.Extensions.AI.Evaluation.Reporting (10)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (1)
Microsoft.Extensions.AI.Evaluation.Safety (10)
Microsoft.Extensions.AI.Integration.Tests (4)
Microsoft.Extensions.AI.OpenAI (2)
Microsoft.Extensions.AI.OpenAI.Tests (2)
Microsoft.Extensions.AI.Templates.Tests (1)
Microsoft.Extensions.AI.Tests (3)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (1)
Microsoft.Extensions.DotNetDeltaApplier.Tests (1)
Microsoft.Extensions.Http.Diagnostics (2)
Microsoft.Extensions.Validation.GeneratorTests (1)
Microsoft.Gen.ComplianceReports.Unit.Tests (3)
Microsoft.Gen.ContextualOptions.Unit.Tests (3)
Microsoft.Gen.Logging.Unit.Tests (3)
Microsoft.Gen.MetadataExtractor (2)
Microsoft.Gen.MetadataExtractor.Unit.Tests (3)
Microsoft.Gen.Metrics (3)
Microsoft.Gen.Metrics.Unit.Tests (3)
Microsoft.Gen.MetricsReports (2)
Microsoft.Gen.MetricsReports.Unit.Tests (3)
Microsoft.Maui.Controls (4)
Microsoft.Maui.Controls.DesignTools (2)
Microsoft.Maui.Resizetizer (1)
Microsoft.ML.AutoML (1)
Microsoft.ML.CodeGenerator (3)
Microsoft.ML.Core (2)
Microsoft.ML.Core.Tests (1)
Microsoft.ML.Data (5)
Microsoft.ML.InternalCodeAnalyzer (1)
Microsoft.ML.Predictor.Tests (1)
Microsoft.ML.ResultProcessor (4)
Microsoft.ML.StandardTrainers (1)
Microsoft.ML.Sweeper (1)
Microsoft.ML.TestFramework (32)
BaseTestBaseline.cs (32)
68private static readonly Regex _matchNumbers = new Regex(@"-?\b[0-9]+\.?[0-9]*(E[-+][0-9]*)?\b", RegexOptions.IgnoreCase | RegexOptions.Compiled);
301private static readonly Regex _matchDataRoot = new Regex(DataRootRegExp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
302private static readonly Regex _matchDataUnixRoot = new Regex(DataRootUnixRegExp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
303private static readonly Regex _matchSamplesRoot = new Regex(SamplesRootRegExp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
304private static readonly Regex _matchSamplesUnixRoot = new Regex(SamplesRootUnixRegExp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
305private static readonly Regex _matchSourceRoot = new Regex(SourceRootRegExp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
306private static readonly Regex _matchSourceUnixRoot = new Regex(SourceRootUnixRegExp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
307private static readonly Regex _matchTestsRoot = new Regex(TestsRootRegExp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
308private static readonly Regex _matchOutputRoot = new Regex(OutputRootRegExp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
309private static readonly Regex _matchOutputUnixRoot = new Regex(OutputRootUnixRegExp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
310private static readonly Regex _matchTL = new Regex(@"[a-z]:\\[a-z0-9_\.\\]+\\TL.exe", RegexOptions.IgnoreCase | RegexOptions.Compiled);
311private static readonly Regex _matchTempFile = new Regex(@"[a-z]:\\users\\[a-z0-9_\.]+\\appdata\\local\\temp\\[a-z0-9_\.\\]*\.tmp", RegexOptions.IgnoreCase | RegexOptions.Compiled);
312private static readonly Regex _matchTempDir = new Regex(@"[a-z]:\\users\\[a-z0-9_\.]+\\appdata\\local\\temp\\[a-z0-9_\.\\]+\\", RegexOptions.IgnoreCase | RegexOptions.Compiled);
313private static readonly Regex _matchTempUnixDir = new Regex(@"\/(var\/)?tmp" + @"\/[^\\\t ]+", RegexOptions.IgnoreCase | RegexOptions.Compiled);
314private static readonly Regex _matchTempDirServiceProfile = new Regex(@"[a-z]:\\Windows\\ServiceProfiles\\[a-z0-9_\.]+\\appdata\\local\\temp\\[a-z0-9_\.\\]+", RegexOptions.IgnoreCase | RegexOptions.Compiled);
315private static readonly Regex _matchTempWindows = new Regex(@"[a-z]:\\Windows\\Temp\\[a-z0-9_\.]+", RegexOptions.IgnoreCase | RegexOptions.Compiled);
316private static readonly Regex _matchDateTime = new Regex(@"[0-9]{1,4}[-/][0-9]{1,2}[-/][0-9]{1,4} [0-9]{1,2}:[0-9]{1,2}:[0-9]{1,4}(\.[0-9]+)?( *[AP]M)?", RegexOptions.IgnoreCase | RegexOptions.Compiled);
317private static readonly Regex _matchTime = new Regex(@"[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?", RegexOptions.Compiled);
318private static readonly Regex _matchShortTime = new Regex(@"\([0-9]{2}:[0-9]{2}(\.[0-9]+)?\)", RegexOptions.Compiled);
319private static readonly Regex _matchMemory = new Regex(@"memory usage\(MB\): [0-9]+", RegexOptions.Compiled);
320private static readonly Regex _matchReservedMemory = new Regex(@": [0-9]+ bytes", RegexOptions.Compiled);
321private static readonly Regex _matchElapsed = new Regex(@"Time elapsed\(s\): [0-9.]+", RegexOptions.Compiled);
322private static readonly Regex _matchTimes = new Regex(@"Instances caching time\(s\): [0-9\.]+", RegexOptions.Compiled);
323private static readonly Regex _matchUpdatesPerSec = new Regex(@", ([0-9\.]+|Infinity)M WeightUpdates/sec", RegexOptions.Compiled);
324private static readonly Regex _matchParameterT = new Regex(@"=PARAM:/t:[0-9]+", RegexOptions.Compiled);
325private static readonly Regex _matchInfinity = new Regex(@"\u221E", RegexOptions.Compiled);
326private static readonly Regex _matchErrorLog = new Regex(@"Error_[\w-]+\.log", RegexOptions.Compiled);
327private static readonly Regex _matchGuid = new Regex(@"[A-F0-9]{8}(?:-[A-F0-9]{4}){3}-[A-F0-9]{12}", RegexOptions.IgnoreCase | RegexOptions.Compiled);
328private static readonly Regex _matchBin = new Regex(_binRegExp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
329private static readonly Regex _matchUnixBin = new Regex(_binRegUnixExp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
330private static readonly Regex _matchBin64 = new Regex(_bin64RegExp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
331private static readonly Regex _matchUnixBin64 = new Regex(_bin64RegUnixExp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
Microsoft.ML.Tests (3)
Microsoft.ML.Tokenizers (52)
Model\TiktokenTokenizer.cs (8)
1189private static (Dictionary<string, int> SpecialTokens, Regex Regex, string VocabFile, Type? DataType, string PackageName) GetTiktokenConfigurations(string modelName) => GetTiktokenConfigurations(GetModelEncoding(modelName), modelName);
1191private static (Dictionary<string, int> SpecialTokens, Regex Regex, string VocabFile, Type? DataType, string PackageName) GetTiktokenConfigurations(ModelEncoding modelEncoding, string? modelName = null)
1261private static partial Regex Cl100kBaseRegex();
1264internal static partial Regex P50kBaseRegex();
1267internal static partial Regex O200kBaseRegex();
1291(Dictionary<string, int> SpecialTokens, Regex Regex, string VocabFile, Type? DataType, string PackageName) tiktokenConfiguration = GetTiktokenConfigurations(modelEncoding, modelName);
1451(Dictionary<string, int> SpecialTokens, Regex Regex, string _, Type? __, string ___) tiktokenConfiguration = GetTiktokenConfigurations(modelName);
1491(Dictionary<string, int> SpecialTokens, Regex Regex, string _, Type? __, string ___) tiktokenConfiguration = GetTiktokenConfigurations(modelName);
PreTokenizer\PreTokenizer.cs (8)
32internal static IEnumerable<(int Offset, int Length)> SplitText(string text, Regex regex)
50private static partial Regex WhiteSpaceOrPunctuationRegex();
79private static partial Regex WordOrNonWordRegex();
109private static partial Regex WhiteSpaceRegex();
133internal static IEnumerable<(int Offset, int Length)> SplitText(ReadOnlySpan<char> text, Regex regex)
140static IEnumerable<(int Offset, int Length)> SplitText(char[] text, Regex regex, int textLength)
157internal static bool TryGetMatch(Regex regex, string text, int beginning, int length, out (int offset, int length) match)
178internal static bool TryGetMatch(Regex regex, scoped ReadOnlySpan<char> text, int beginning, int length, out (int offset, int length) match)
PreTokenizer\RegexPreTokenizer.cs (8)
18private readonly Regex? _specialTokensRegex;
19private readonly Regex _regex;
27public RegexPreTokenizer(Regex regex, IReadOnlyDictionary<string, int>? specialTokens)
39_specialTokensRegex = new Regex(string.Join("|", specialTokens.Keys.Select(s => Regex.Escape(s))), RegexOptions.Compiled);
57static IEnumerable<(int Offset, int Length)> SplitText(string text, Regex regex, Regex? specialTokensRegex)
108static IEnumerable<(int Offset, int Length)> SplitText(char[] text, Regex regex, Regex? specialTokensRegex, int textLength)
Microsoft.NET.Build.Containers (17)
Microsoft.NET.Build.Tasks.UnitTests (1)
Microsoft.NET.Build.Tests (1)
Microsoft.NET.Publish.Tests (1)
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (11)
Microsoft.NET.Sdk.Publish.Tasks (5)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (12)
Microsoft.NET.Sdk.StaticWebAssets.Tests (16)
ScopedCssIntegrationTests.cs (7)
154var counterScopeMatch = Regex.Match(counterContent, ".*button\\[(.*)\\].*", RegexOptions.Multiline | RegexOptions.IgnoreCase);
158var indexScopeMatch = Regex.Match(indexContent, ".*h1\\[(.*)\\].*", RegexOptions.Multiline | RegexOptions.IgnoreCase);
186var indexScopeMatch = Regex.Match(indexContent, ".*p\\[(.*)\\].*", RegexOptions.Multiline | RegexOptions.IgnoreCase);
190var aboutScopeMatch = Regex.Match(aboutContent, ".*h2\\[(.*)\\].*", RegexOptions.Multiline | RegexOptions.IgnoreCase);
194var contactScopeMatch = Regex.Match(contactContent, ".*a\\[(.*)\\].*", RegexOptions.Multiline | RegexOptions.IgnoreCase);
223var indexScopeMatch = Regex.Match(indexContent, ".*p\\[(.*)\\].*", RegexOptions.Multiline | RegexOptions.IgnoreCase);
227var counterScopeMatch = Regex.Match(counterContent, ".*div\\[(.*)\\].*", RegexOptions.Multiline | RegexOptions.IgnoreCase);
Microsoft.NET.TestFramework (5)
Microsoft.TemplateEngine.Cli (2)
Microsoft.VisualBasic.Core (8)
Microsoft.WebTools.AspireService.Tests (1)
Microsoft.Win32.Msi (2)
MSBuild (4)
MSBuildTaskHost (3)
netstandard (1)
PresentationBuildTasks (1)
PresentationFramework (1)
Publishers.AppHost (1)
QuarantineTools.Tests (4)
Roslyn.Diagnostics.Analyzers (13)
Roslyn.Diagnostics.CSharp.Analyzers (1)
Roslyn.VisualStudio.Next.UnitTests (1)
RoutingSandbox (1)
RunTests (3)
SDDLTests (1)
sdk-tasks (4)
SemanticSearch.BuildTask (4)
System (1)
System.ComponentModel.Annotations (1)
System.ComponentModel.TypeConverter (13)
System.Configuration.ConfigurationManager (1)
System.Data.Common (24)
System.Data.Odbc (35)
System.Drawing.Common.Tests (2)
System.Net.WebProxy (5)
System.Private.DataContractSerialization (13)
System.Private.Xml (27)
System.Security.Permissions (2)
System.Text.Json (14)
System.Text.RegularExpressions (81)
System\Text\RegularExpressions\RegexAssemblyCompiler.cs (17)
75TypeBuilder regexTypeBuilder = DefineType(_module, name, isPublic, isSealed: false, typeof(Regex));
79if (matchTimeout != Regex.InfiniteMatchTimeout)
112_ilg!.Emit(OpCodes.Call, typeof(Regex).GetConstructor(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance, null, Type.EmptyTypes, Array.Empty<ParameterModifier>())!);
115Stfld(RegexField(nameof(Regex.pattern)));
118Stfld(RegexField(nameof(Regex.roptions)));
121Stfld(RegexField(nameof(Regex.factory)));
125if (matchTimeout == Regex.InfiniteMatchTimeout)
128_ilg.Emit(OpCodes.Ldsfld, RegexField(nameof(Regex.InfiniteMatchTimeout)));
136Stfld(RegexField(nameof(Regex.internalMatchTimeout)));
141Stfld(RegexField(nameof(Regex.capsize)));
145GenerateCreateHashtable(RegexField(nameof(Regex.caps)), tree.CaptureNumberSparseMapping);
150GenerateCreateHashtable(RegexField(nameof(Regex.capnames)), tree.CaptureNameToNumberMapping);
161FieldInfo capslistField = RegexField(nameof(Regex.capslist));
184Call(typeof(Regex).GetMethod(nameof(Regex.ValidateMatchTimeout), BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static)!);
187Stfld(RegexField(nameof(Regex.internalMatchTimeout)));
225typeof(Regex).GetField(fieldname, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static)!;
System\Text\RegularExpressions\RegexReplacement.cs (4)
194public string Replace(Regex regex, string input, int count, int startat)
226private static unsafe string ReplaceSimpleText(Regex regex, string input, string replacement, int count, int startat)
296private string ReplaceNonSimpleText(Regex regex, string input, int count, int startat)
343return Regex.SegmentsToStringAndDispose(ref state.segments);
System\Text\RegularExpressions\RegexRunner.cs (9)
102protected internal Regex? runregex;
114/// <summary>Used by a <see cref="Regex"/> object to scan the input <paramref name="text"/> looking for the next match.</summary>
118/// <see cref="ReadOnlySpan{T}"/>-based <see cref="Regex"/> methods are not supported from <see cref="Regex"/>-derived types
163protected Match? Scan(Regex regex, string text, int textbeg, int textend, int textstart, int prevlen, bool quick) =>
171protected internal Match? Scan(Regex regex, string text, int textbeg, int textend, int textstart, int prevlen, bool quick, TimeSpan timeout)
231private Match InternalScan(Regex regex, int textbeg, int textend)
276internal void InitializeForScan(Regex regex, ReadOnlySpan<char> text, int textstart, RegexRunnerMode mode)
343if (Regex.InfiniteMatchTimeout != timeout)
System.Windows.Forms (10)
System.Windows.Forms.Analyzers (1)
System.Windows.Forms.Design (10)
System.Windows.Forms.Tests (9)
TaskUsageLogger (1)
Templates.Blazor.Tests (21)
Templates.Blazor.WebAssembly.Auth.Tests (21)
Templates.Blazor.WebAssembly.Tests (21)
Templates.Mvc.Tests (21)
Templates.Tests (21)
Test.Utilities (1)
Text.Analyzers (13)
VersioningWebSite (1)
XmlFileLogger (1)
xunit.assert (4)
xunit.console (1)