75 references to Replace
Aspire.Dashboard (1)
Utils\FormatHelpers.cs (1)
66return MatchSecondsInTimeFormatPattern().Replace(longTimePattern, $"$1'{key.NumberDecimalSeparator}'{millisecondFormat}");
Aspire.Hosting (1)
Dcp\DcpDependencyCheck.cs (1)
154dcpVersionString = VersionRegex().Replace(dcpVersionString, string.Empty);
Aspire.Workload.Tests (4)
AppHostTemplateTests.cs (1)
31var newContents = AppHostPackageReferenceRegex().Replace(File.ReadAllText(projectPath), @"$1""8.1.0""");
BuildAndRunTemplateTests.cs (1)
87AppHostVersionRegex().Replace(projectContents, @"<PackageReference Include=""Aspire.Hosting.AppHost"" />")
WorkloadTestsBase.cs (2)
124sb.AppendLine(CommentLineRegex().Replace(line, " ")); 131var classNameFromId = GeneratedClassNameFixupRegex().Replace(id, "_");
BuildActionTelemetryTable (1)
Program.cs (1)
649part = regex.Replace(part, " ");
Microsoft.AspNetCore.Components.Endpoints.Tests (3)
RazorComponentResultTest.cs (3)
408html = TemplateElementComponentIdRegex.Replace(html, "blazor-component-id=\"X\""); 409html = OpenBoundaryMarkerRegex.Replace(html, "<!--bl:X-->"); 410html = CloseBoundaryMarkerRegex.Replace(html, "<!--/bl:X-->");
Microsoft.AspNetCore.InternalTesting.Tests (4)
AssemblyTestLogTests.cs (3)
397var strippedDuration = DurationRegex.Replace(strippedPrefix, "DURATION"); 398var strippedTimestamp = TimestampRegex.Replace(strippedDuration, "TIMESTAMP"); 399var strippedTimestampOffset = TimestampOffsetRegex.Replace(strippedTimestamp, "OFFSET");
XunitLoggerProviderTest.cs (1)
84private string MakeConsistent(string input) => TimestampRegex.Replace(input, "TIMESTAMP");
Microsoft.AspNetCore.SpaServices.Extensions (1)
Npm\NodeScriptRunner.cs (1)
121=> AnsiColorRegex.Replace(line, string.Empty);
Microsoft.Build (1)
Utilities\Utilities.cs (1)
307return s_xmlnsPattern.Replace(xml, String.Empty);
Microsoft.CodeAnalysis.CodeStyle (1)
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
374=> s_removeEscapedBracketsRegex.Replace(formatString, " ");
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.SingleLineRewriter.cs (1)
64var newText = s_newlinePattern.Replace(token.Text, " ");
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.SingleLineRewriter.cs (1)
64var newText = s_newlinePattern.Replace(token.Text, " ");
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Semantics\SpeculationAnalyzerTestsBase.cs (1)
38var replacementTree = Parse(UnderTestRegex.Replace(code, replacementExpression));
Microsoft.CodeAnalysis.Features (1)
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
374=> s_removeEscapedBracketsRegex.Replace(formatString, " ");
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (1)
177session.GetTestAccessor().SetTelemetryLogger((id, message) => _telemetryLog.Add($"{id}: {s_timePropertiesRegex.Replace(message.GetMessage(), "")}"), () => ++_telemetryId);
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Extensions\ProtocolConversions.cs (1)
967var text = isCode ? taggedText.Text : s_markdownEscapeRegex.Replace(taggedText.Text, @"\$1");
Microsoft.CodeAnalysis.Test.Utilities (2)
CompilationVerifier.cs (1)
206return s_headerCommentsRegex.Replace(value, "");
MarkedSource\SourceWithMarkedNodes.cs (1)
77return s_tags.Replace(source, "");
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SingleLineRewriter.vb (1)
47Dim newText = s_newlinePattern.Replace(token.Text, " ")
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
CodeGen\CodeGenVBCore.vb (1)
3213expected = New Regex("^" + indent, RegexOptions.Multiline).Replace(expected, "")
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SingleLineRewriter.vb (1)
47Dim newText = s_newlinePattern.Replace(token.Text, " ")
Microsoft.CodeAnalysis.Workspaces (1)
Rename\RenameUtilities.cs (1)
259return regex.Replace(replaceInsideString, replacementText);
Microsoft.DotNet.Helix.JobSender (2)
JobDefinition.cs (2)
218ResultContainerPrefix = multipleDashes.Replace(illegalCharacters.Replace(ResultContainerPrefix, ""), "-");
Microsoft.Extensions.Http.Diagnostics (1)
Http\DownstreamDependencyMetadataManager.cs (1)
126var route = _routeRegex.Replace(requestRouteAsSpan.ToString(), "*");
Microsoft.Gen.Metrics (1)
Emitter.cs (1)
46return _regex.Replace(paramName, "_");
Microsoft.ML.Core.Tests (2)
UnitTests\TestEntryPoints.cs (2)
341regex.Replace(x.Description, ""), 356entry[FieldNames.Desc] = regex.Replace(entry[FieldNames.Desc].ToString(), "");
Microsoft.ML.TestFramework (33)
BaseTestBaseline.cs (33)
345line = _matchDataRoot.Replace(line, "%Data%"); 346line = _matchDataUnixRoot.Replace(line, "%Data%"); 347line = _matchOutputRoot.Replace(line, "%Output%"); 348line = _matchOutputUnixRoot.Replace(line, "%Output%"); 349line = _matchSamplesRoot.Replace(line, "%Samples%\\"); 350line = _matchSamplesUnixRoot.Replace(line, "%Samples%\\"); 351line = _matchSourceRoot.Replace(line, "%Source%\\"); 352line = _matchSourceUnixRoot.Replace(line, "%Source%\\"); 353line = _matchTestsRoot.Replace(line, "%Tests%\\"); 354line = _matchBin.Replace(line, "%Bin%\\"); 355line = _matchUnixBin.Replace(line, "%Bin%\\"); 356line = _matchBin64.Replace(line, "%Bin%\\"); 357line = _matchUnixBin64.Replace(line, "%Bin%\\"); 358line = _matchTL.Replace(line, "%TL%"); 359line = _matchTempFile.Replace(line, "%Temp%"); 360line = _matchTempDir.Replace(line, "%Temp%\\"); 361line = _matchTempUnixDir.Replace(line, "%Temp%\\"); 362line = _matchTempDirServiceProfile.Replace(line, "%Temp%"); 363line = _matchTempWindows.Replace(line, "%Temp%"); 364line = _matchDateTime.Replace(line, "%DateTime%"); 365line = _matchTime.Replace(line, "%Time%"); 366line = _matchShortTime.Replace(line, "(%Time%)"); 367line = _matchElapsed.Replace(line, "Time elapsed(s): %Number%"); 368line = _matchMemory.Replace(line, "memory usage(MB): %Number%"); 369line = _matchReservedMemory.Replace(line, ": %Number% bytes"); 370line = _matchTimes.Replace(line, "Instances caching time(s): %Number%"); 371line = _matchUpdatesPerSec.Replace(line, ", %Number%M WeightUpdates/sec"); 372line = _matchParameterT.Replace(line, "=PARAM:/t:%Number%"); 373line = _matchInfinity.Replace(line, "Infinity"); 374line = _matchErrorLog.Replace(line, "%ErrorLog%"); 375line = _matchGuid.Replace(line, "%Guid%"); 587firstString = _matchNumbers.Replace(firstString, "%Number%"); 588secondString = _matchNumbers.Replace(secondString, "%Number%");
System.ComponentModel.TypeConverter (1)
System\ComponentModel\Design\DesignerVerb.cs (1)
25Properties["Text"] = text == null ? null : ParameterReplacementRegex.Replace(text, "");
System.Text.RegularExpressions (3)
System\Text\RegularExpressions\Regex.Replace.cs (3)
20RegexCache.GetOrAdd(pattern).Replace(input, replacement); 28RegexCache.GetOrAdd(pattern, options, s_defaultMatchTimeout).Replace(input, replacement); 31RegexCache.GetOrAdd(pattern, options, matchTimeout).Replace(input, replacement);
System.Windows.Forms.Design (2)
System\ComponentModel\Design\DesignerActionItem.cs (1)
21DisplayName = displayName is null ? null : SanitizeNameRegex().Replace(displayName, "");
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (1)
2061private static string ReplaceText(string text) => text is null ? null : ParenthesisRegex().Replace(text, "");
VisualBasicSyntaxGenerator (1)
Grammar\GrammarGenerator.vb (1)
335s_normalizationRegex.Replace(trimmed, "_").ToLower(),