87 references to Escape
Aspire.Cli.Tests (1)
Utils\TerminalLinkAssert.cs (1)
18var escapedLink = Regex.Escape(link);
Aspire.Dashboard (2)
Components\Layout\MobileNavMenu.razor.cs (2)
202pageRelativeBasePath = Regex.Escape(pageRelativeBasePath); 208pageRelativeBasePath = Regex.Escape(pageRelativeBasePath);
Aspire.Dashboard.Tests (1)
Markdown\MarkdownProcessorTests.cs (1)
43var count = Regex.Matches(html, Regex.Escape("code-block")).Count;
Aspire.Hosting.CodeGeneration.Java.Tests (1)
AtsJavaCodeGeneratorTests.cs (1)
435if (!Regex.IsMatch(body, $@"\b{Regex.Escape(simpleName)}\b"))
Aspire.Hosting.Kubernetes.Tests (4)
KubernetesIngressTests.cs (1)
122new System.Text.RegularExpressions.Regex(@"parameters:\s*[\r\n]+\s*public:\s*[\r\n]+\s*" + System.Text.RegularExpressions.Regex.Escape(parameterName) + @"\s*:"),
KubernetesPublisherTests.cs (3)
1997System.Text.RegularExpressions.Regex.Escape(storageClassName) + @"\s*:"); 2001System.Text.RegularExpressions.Regex.Escape(capacityName) + @"\s*:"), 2005System.Text.RegularExpressions.Regex.Escape(backupTierName) + @"\s*:"),
Aspire.Hosting.RemoteHost (2)
Ats\PolyglotCapabilityInvocationException.cs (2)
523$@"\b{Regex.Escape(clrMemberName)}\b", 536$@"\b{Regex.Escape(alias.Key)}\b",
Infrastructure.Tests (5)
TestTriggerMap\TestTriggerMapModel.cs (2)
104var regex = "^" + System.Text.RegularExpressions.Regex.Escape(before) + "([^/]+)" + 105System.Text.RegularExpressions.Regex.Escape(after) + (hasGlobSuffix ? "/.+" : "") + "$";
WorkflowScripts\CiWorkflowTests.cs (2)
59$@"(?ms)^ {System.Text.RegularExpressions.Regex.Escape(jobName)}:\n(?<body>.*?)(?=^ [A-Za-z0-9_-]+:\n|\z)"); 69$@"(?ms)^ - name: {System.Text.RegularExpressions.Regex.Escape(stepName)}\n.*?(?=^ - |\z)");
WorkflowScripts\ExtensionChangelogFinalizedWorkflowTests.cs (1)
532$"(?m)^{Regex.Escape(key)}:\\r?\\n(?<value>(?:^[ ].*\\r?\\n)*)",
Microsoft.AspNetCore.App.Analyzers (1)
RouteEmbeddedLanguage\Infrastructure\EmbeddedLanguageCommentDetector.cs (1)
28var namePortion = string.Join("|", identifiers.Select(n => $"({Regex.Escape(n)})"));
Microsoft.AspNetCore.Grpc.JsonTranscoding (2)
Internal\JsonTranscodingRouteAdapter.cs (2)
122var constraint = suffix.Length > 0 ? $":regex({Regex.Escape(suffix)}$)" : string.Empty; 184tempSegments[i] = $"{{**__Discard_{i}:regex({Regex.Escape($":{pattern.Verb}")}$)}}";
Microsoft.Build (3)
BuildCheck\Infrastructure\EditorConfig\EditorConfigGlobsMatcher.cs (2)
250sb.Append(Regex.Escape(lexer.EatCurrentCharacter().ToString())); 360sb.Append(Regex.Escape(currentChar.ToString()));
Definition\ToolsetReader.cs (1)
207var r = new Regex(Regex.Escape(xbuildToolsetsDir) + @"\d+\.\d+");
Microsoft.CodeAnalysis (2)
CommandLine\AnalyzerConfig.SectionNameMatching.cs (2)
257sb.Append(Regex.Escape(lexer.EatCurrentCharacter().ToString())); 367sb.Append(Regex.Escape(currentChar.ToString()));
Microsoft.CodeAnalysis.Features (1)
EmbeddedLanguages\EmbeddedLanguageCommentDetector.cs (1)
27var namePortion = string.Join("|", identifiers.Select(n => $"({Regex.Escape(n)})"));
Microsoft.Data.Analysis (1)
TextFieldParser.cs (1)
1005string escapedDelimiter = Regex.Escape(_delimiters[i]);
Microsoft.Data.Analysis.Tests (1)
src\Microsoft.Data.Analysis\TextFieldParser.cs (1)
1005string escapedDelimiter = Regex.Escape(_delimiters[i]);
Microsoft.DotNet.Build.Tasks.Workloads (1)
Utils.cs (1)
112string escapedPattern = Regex.Escape(wildcardPattern).Replace(@"\*", ".*").Replace(@"\?", ".");
Microsoft.DotNet.Cli.Utils (1)
PathUtility.cs (1)
373return Regex.Escape(Path.DirectorySeparatorChar.ToString());
Microsoft.DotNet.SourceBuild.Tasks (1)
src\UsageReport\UsagePattern.cs (1)
36string regex = Regex.Escape(IdentityGlob).Replace("\\*", ".*");
Microsoft.Extensions.AI.Evaluation (8)
Utilities\ModelInfo.cs (8)
36new Regex($"\\({Regex.Escape(KnownModelHostMonikers.LocalMachine)}\\)$"); 54$"{Regex.Escape(KnownModelHostMonikers.AzureAIFoundry)}|" + 55$"{Regex.Escape(KnownModelHostMonikers.AzureOpenAI)}|" + 56$"{Regex.Escape(KnownModelHostMonikers.AzureML)}|" + 57$"{Regex.Escape(KnownModelHostMonikers.GitHubModels)}|" + 58$"{Regex.Escape(KnownModelHostMonikers.Azure)}|" + 59$"{Regex.Escape(KnownModelHostMonikers.GitHub)}|" + 60$"{Regex.Escape(KnownModelHostMonikers.Microsoft)}" +
Microsoft.Extensions.AI.Evaluation.Console (8)
parent\Microsoft.Extensions.AI.Evaluation\Utilities\ModelInfo.cs (8)
36new Regex($"\\({Regex.Escape(KnownModelHostMonikers.LocalMachine)}\\)$"); 54$"{Regex.Escape(KnownModelHostMonikers.AzureAIFoundry)}|" + 55$"{Regex.Escape(KnownModelHostMonikers.AzureOpenAI)}|" + 56$"{Regex.Escape(KnownModelHostMonikers.AzureML)}|" + 57$"{Regex.Escape(KnownModelHostMonikers.GitHubModels)}|" + 58$"{Regex.Escape(KnownModelHostMonikers.Azure)}|" + 59$"{Regex.Escape(KnownModelHostMonikers.GitHub)}|" + 60$"{Regex.Escape(KnownModelHostMonikers.Microsoft)}" +
Microsoft.Extensions.AI.Evaluation.Reporting (8)
parent\parent\Microsoft.Extensions.AI.Evaluation\Utilities\ModelInfo.cs (8)
36new Regex($"\\({Regex.Escape(KnownModelHostMonikers.LocalMachine)}\\)$"); 54$"{Regex.Escape(KnownModelHostMonikers.AzureAIFoundry)}|" + 55$"{Regex.Escape(KnownModelHostMonikers.AzureOpenAI)}|" + 56$"{Regex.Escape(KnownModelHostMonikers.AzureML)}|" + 57$"{Regex.Escape(KnownModelHostMonikers.GitHubModels)}|" + 58$"{Regex.Escape(KnownModelHostMonikers.Azure)}|" + 59$"{Regex.Escape(KnownModelHostMonikers.GitHub)}|" + 60$"{Regex.Escape(KnownModelHostMonikers.Microsoft)}" +
Microsoft.Extensions.AI.Evaluation.Safety (8)
parent\Microsoft.Extensions.AI.Evaluation\Utilities\ModelInfo.cs (8)
36new Regex($"\\({Regex.Escape(KnownModelHostMonikers.LocalMachine)}\\)$"); 54$"{Regex.Escape(KnownModelHostMonikers.AzureAIFoundry)}|" + 55$"{Regex.Escape(KnownModelHostMonikers.AzureOpenAI)}|" + 56$"{Regex.Escape(KnownModelHostMonikers.AzureML)}|" + 57$"{Regex.Escape(KnownModelHostMonikers.GitHubModels)}|" + 58$"{Regex.Escape(KnownModelHostMonikers.Azure)}|" + 59$"{Regex.Escape(KnownModelHostMonikers.GitHub)}|" + 60$"{Regex.Escape(KnownModelHostMonikers.Microsoft)}" +
Microsoft.Extensions.Configuration.Binder.SourceGeneration (1)
Emitter\CoreBindingHelpers.cs (1)
21private static readonly Regex s_arrayBracketsRegex = new(Regex.Escape("[]"));
Microsoft.Maui.Controls (1)
WebView\WebView.cs (1)
324 js = Regex.Replace(js, @"(?<=[^\\])" + Regex.Escape(match), replacementStr);
Microsoft.ML.CodeGenerator (3)
Templates\Azure\Console\AzureModelBuilder.cs (1)
59this.Write(this.ToStringHelper.ToStringWithCulture(Regex.Escape(Separator.ToString())));
Templates\Console\ModelBuilder.cs (2)
65this.Write(this.ToStringHelper.ToStringWithCulture(Regex.Escape(Separator.ToString()))); 77this.Write(this.ToStringHelper.ToStringWithCulture(Regex.Escape(Separator.ToString())));
Microsoft.ML.Tokenizers (4)
Model\SentencePieceBaseModel.cs (2)
51SpecialTokensRegex = new Regex(string.Join("|", specialTokens.Keys.Select(s => Regex.Escape(s))), RegexOptions.Compiled); 97SpecialTokensRegex = new Regex(string.Join("|", specialTokens.Keys.Select(s => Regex.Escape(s))), RegexOptions.Compiled);
PreTokenizer\CompositePreTokenizer.cs (1)
58list.Add(new RegexPreTokenizer(new Regex(string.Join("|", specialTokens.Keys.Select(s => Regex.Escape(s))), RegexOptions.Compiled), null));
PreTokenizer\RegexPreTokenizer.cs (1)
39_specialTokensRegex = new Regex(string.Join("|", specialTokens.Keys.Select(s => Regex.Escape(s))), RegexOptions.Compiled);
Microsoft.NET.Build.Containers (1)
ReferenceParser.cs (1)
297private static string literal(string s) => Regex.Escape(s);
Microsoft.NET.Sdk.Publish.Tasks (3)
MsDeploy\VSMSDeployHostObject.cs (2)
54srcSkipRuleItem.SetMetadata("AbsolutePath", Regex.Escape(Path.Combine(rootFolderOfFileToPublish, p.SourceFilePath)) + "$"); 63destSkipRuleItem.SetMetadata("AbsolutePath", Regex.Escape(p.DestinationFilePath) + "$");
Tasks\MsDeploy\CreateParameterFile.cs (1)
163metadataValue = $"^{Regex.Escape(metadataValue)}$";
Microsoft.TemplateEngine.Cli (1)
TemplateInvoker.cs (1)
152Regex pattern = new($"[{Regex.Escape(new string(invalidChars))}]");
Microsoft.TemplateEngine.Edge (1)
Mount\Archive\ZipFileDirectory.cs (1)
23string rx = Regex.Escape(pattern);
Microsoft.TemplateEngine.Utils (3)
InMemoryFileSystem.cs (3)
196Regex rx = new(Regex.Escape(pattern).Replace("\\*", ".*").Replace("\\?", ".")); 276Regex rx = new(Regex.Escape(pattern).Replace("\\*", ".*").Replace("\\?", ".")); 358Regex rx = new("^" + Regex.Escape(pattern).Replace("\\*", ".*").Replace("\\?", ".") + "$");
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\FileIO\TextFieldParser.vb (1)
1192Dim EscapedDelimiter As String = Regex.Escape(m_Delimiters(i))
NuGet.Common (1)
PathUtil\PathResolver.cs (1)
75string pattern = Regex.Escape(wildcard);
NuGet.Configuration (1)
Proxy\WebProxy.cs (1)
90return Regex.Escape(pattern)
SelectTests (2)
TriggerMap.cs (2)
157var regex = "^" + Regex.Escape(before) + "([^/]+)" + Regex.Escape(after) + (hasGlobSuffix ? "/.+" : "") + "$";
System.Text.RegularExpressions (2)
System\Text\RegularExpressions\Regex.cs (2)
360/// <see cref="Escape" /> converts a string so that the regular expression engine will interpret any 390/// <see cref="Escape" /> method by removing the escape character ("\") from each escaped character.