81 references to Escape
Aspire.Dashboard (1)
Components\Layout\MobileNavMenu.razor.cs (1)
110pageRelativeBasePath = Regex.Escape(pageRelativeBasePath);
Aspire.Dashboard.Tests (1)
Markdown\MarkdownProcessorTests.cs (1)
51var count = Regex.Matches(html, Regex.Escape("code-block")).Count;
GenerateDocumentationAndConfigFiles (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher_TryParseSection.cs (2)
83sb.Append(Regex.Escape(lexer.EatCurrentCharacter().ToString())); 229sb.Append(Regex.Escape(currentChar.ToString()));
Microsoft.AspNetCore.App.Analyzers (1)
RouteEmbeddedLanguage\Infrastructure\EmbeddedLanguageCommentDetector.cs (1)
28var namePortion = string.Join("|", identifiers.Select(n => $"({Regex.Escape(n)})"));
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)
193var r = new Regex(Regex.Escape(xbuildToolsetsDir) + @"\d+\.\d+");
Microsoft.CodeAnalysis (2)
CommandLine\AnalyzerConfig.SectionNameMatching.cs (2)
246sb.Append(Regex.Escape(lexer.EatCurrentCharacter().ToString())); 356sb.Append(Regex.Escape(currentChar.ToString()));
Microsoft.CodeAnalysis.Analyzers (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher_TryParseSection.cs (2)
83sb.Append(Regex.Escape(lexer.EatCurrentCharacter().ToString())); 229sb.Append(Regex.Escape(currentChar.ToString()));
Microsoft.CodeAnalysis.AnalyzerUtilities (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher_TryParseSection.cs (2)
83sb.Append(Regex.Escape(lexer.EatCurrentCharacter().ToString())); 229sb.Append(Regex.Escape(currentChar.ToString()));
Microsoft.CodeAnalysis.CodeStyle (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher_TryParseSection.cs (2)
83sb.Append(Regex.Escape(lexer.EatCurrentCharacter().ToString())); 229sb.Append(Regex.Escape(currentChar.ToString()));
Microsoft.CodeAnalysis.Features (1)
EmbeddedLanguages\EmbeddedLanguageCommentDetector.cs (1)
27var namePortion = string.Join("|", identifiers.Select(n => $"({Regex.Escape(n)})"));
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher_TryParseSection.cs (2)
83sb.Append(Regex.Escape(lexer.EatCurrentCharacter().ToString())); 229sb.Append(Regex.Escape(currentChar.ToString()));
Microsoft.CodeAnalysis.Workspaces (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher_TryParseSection.cs (2)
83sb.Append(Regex.Escape(lexer.EatCurrentCharacter().ToString())); 229sb.Append(Regex.Escape(currentChar.ToString()));
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)
109string 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)
src\Libraries\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)
src\Libraries\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)
src\Libraries\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.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 (3)
Model\SentencePieceBaseModel.cs (1)
51SpecialTokensRegex = 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)
Roslyn.Diagnostics.Analyzers (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher_TryParseSection.cs (2)
83sb.Append(Regex.Escape(lexer.EatCurrentCharacter().ToString())); 229sb.Append(Regex.Escape(currentChar.ToString()));
System.Text.RegularExpressions (2)
System\Text\RegularExpressions\Regex.cs (2)
362/// <see cref="Escape" /> converts a string so that the regular expression engine will interpret any 392/// <see cref="Escape" /> method by removing the escape character ("\") from each escaped character.