160 references to IsMatch
aspire (3)
Certificates\CertificateGeneration\UnixCertificateManager.cs (2)
1031if (isSymlink && OpenSslHashFilenameRegex.IsMatch(file.Name)) 1035else if (OpenSslCertificateExtensionRegex.IsMatch(file.Name))
Commands\NewCommand.cs (1)
463return regex.IsMatch(projectName);
Aspire.Cli.Tests (1)
Projects\ProjectUpdaterTests.cs (1)
2247var match = regex.IsMatch(directive);
Aspire.EndToEnd.Tests (1)
tests\Shared\TemplatesTesting\TemplateCustomHive.cs (1)
87.Where(p => packageNameRegex.IsMatch(Path.GetFileName(p)));
Aspire.Hosting (2)
Pipelines\Internal\FileDeploymentStateManager.cs (1)
47return ValidEnvironmentNameRegex().IsMatch(environmentName);
src\Shared\EnvironmentVariableNameEncoder.cs (1)
25if (string.IsNullOrEmpty(name) || ValidNameRegex().IsMatch(name))
Aspire.Hosting.Azure (1)
Provisioning\Internal\BaseProvisioningContextProvider.cs (1)
57if (!ResourceGroupValidCharacters().IsMatch(name))
Aspire.Hosting.Azure.KeyVault (1)
AzureKeyVaultResourceExtensions.cs (1)
367if (!AzureKeyVaultSecretNameRegex().IsMatch(secretName))
Aspire.Hosting.DevTunnels (3)
DevTunnelResourceBuilderExtensions.cs (2)
62if (!TunnelIdRegex().IsMatch(tunnelId)) 814if (!LabelRegex().IsMatch(label))
src\Shared\EnvironmentVariableNameEncoder.cs (1)
25if (string.IsNullOrEmpty(name) || ValidNameRegex().IsMatch(name))
Aspire.Hosting.Integration.Analyzers (1)
AspireExportAnalyzer.cs (1)
173if (exportId is not null && !s_exportIdPattern.IsMatch(exportId))
Aspire.Hosting.Kubernetes (6)
Extensions\HelmExtensions.cs (6)
82=> ExpressionPattern().IsMatch(value); 85=> ExpressionPattern().IsMatch(value) 89=> ExpressionPattern().IsMatch(value) 98if (HelmFlowControlPattern().IsMatch(value)) 103if (!ScalarExpressionPattern().IsMatch(value)) 111if (EndWithNonStringTypePattern().IsMatch(value))
Aspire.Hosting.Maui (1)
src\Shared\EnvironmentVariableNameEncoder.cs (1)
25if (string.IsNullOrEmpty(name) || ValidNameRegex().IsMatch(name))
Aspire.Playground.Tests (1)
AppHostTests.cs (1)
47var tasks = testEndpoints.WaitForTexts.Select(x => app.WaitForTextAsync(log => new Regex(x.Pattern).IsMatch(log), x.ResourceName)).ToArray();
Aspire.Templates.Tests (2)
TemplateTestsBase.cs (1)
131if (inTest && CommentLineRegex().IsMatch(line))
tests\Shared\TemplatesTesting\TemplateCustomHive.cs (1)
87.Where(p => packageNameRegex.IsMatch(Path.GetFileName(p)));
dotnet (3)
Commands\Run\VirtualProjectBuildingCommand.cs (1)
489if (!Patterns.EscapedCompilerOption.IsMatch(arg))
Commands\Test\MTP\Terminal\AnsiDetector.cs (1)
40=> !string.IsNullOrEmpty(termType) && TerminalsRegexes.Any(regex => regex.IsMatch(termType));
Commands\Test\VSTest\TestCommand.cs (1)
691=> !string.IsNullOrEmpty(termType) && TerminalsRegexes.Any(regex => regex.IsMatch(termType));
dotnet-dev-certs (2)
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (2)
1031if (isSymlink && OpenSslHashFilenameRegex.IsMatch(file.Name)) 1035else if (OpenSslCertificateExtensionRegex.IsMatch(file.Name))
dotnet-svcutil-lib (2)
FrameworkFork\Microsoft.Xml\Xml\schema\FacetChecker.cs (2)
883if (!regex.IsMatch(value)) 1481if (!LanguagePattern.IsMatch(s))
GenerateDocumentationAndConfigFiles (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (1)
304return Regex.IsMatch(s);
ILCompiler.Compiler (1)
src\runtime\src\coreclr\tools\Common\Compiler\ProcessLinkerXmlBase.cs (1)
244if (regex.IsMatch(sb.ToString()))
ILCompiler.ReadyToRun (1)
src\runtime\src\coreclr\tools\Common\Compiler\ProcessLinkerXmlBase.cs (1)
244if (regex.IsMatch(sb.ToString()))
illink (3)
Microsoft.AspNetCore.Components (1)
src\aspnetcore\src\Http\Routing\src\Constraints\RegexRouteConstraint.cs (1)
99return Constraint.IsMatch(parameterValueString);
Microsoft.AspNetCore.DeveloperCertificates.XPlat (2)
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (2)
1031if (isSymlink && OpenSslHashFilenameRegex.IsMatch(file.Name)) 1035else if (OpenSslCertificateExtensionRegex.IsMatch(file.Name))
Microsoft.AspNetCore.Routing (2)
Constraints\RegexRouteConstraint.cs (2)
99return Constraint.IsMatch(parameterValueString); 108return Constraint.IsMatch(literal);
Microsoft.AspNetCore.Server.Kestrel.Core (2)
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (2)
1031if (isSymlink && OpenSslHashFilenameRegex.IsMatch(file.Name)) 1035else if (OpenSslCertificateExtensionRegex.IsMatch(file.Name))
Microsoft.Build (8)
BackEnd\Components\SdkResolution\SdkResolverService.cs (1)
187if (manifest.ResolvableSdkRegex.IsMatch(sdk.Name))
BuildCheck\Infrastructure\EditorConfig\EditorConfigGlobsMatcher.cs (1)
42return Regex.IsMatch(s);
Construction\ProjectRootElement.cs (1)
2001return String.IsNullOrEmpty(contents) || XmlDeclarationRegex.IsMatch(contents);
Definition\ToolsetReader.cs (1)
194foreach (var d in Directory.GetDirectories(xbuildToolsetsDir).Where(d => r.IsMatch(d)))
Globbing\MSBuildGlob.cs (1)
109return _state.Value.Regex.IsMatch(normalizedString);
Utilities\EngineFileUtilities.cs (2)
579item.IsMatch("foo"); 594return _regexMatchCache.Value.GetOrAdd(fileSpec, file => s_lazyWildCardExpansionRegexes.Any(regex => regex.IsMatch(fileSpec)));
Utilities\FileSpecMatchTester.cs (1)
84return _regex.IsMatch(normalizedFileToMatch);
Microsoft.Build.Framework (2)
Logging\AnsiDetector.cs (1)
44if (terminalsRegexes.Any(regex => regex.IsMatch(termType)))
Utilities\FileMatcher.cs (1)
1096return recursionState.SearchData.RegexFileMatch.IsMatch(file);
Microsoft.Build.Utilities.Core (2)
CommandLineBuilder.cs (2)
195bool hasAllUnquotedCharacters = AllowedUnquoted.IsMatch(parameter); 196bool hasSomeQuotedCharacters = DefinitelyNeedQuotes.IsMatch(parameter);
Microsoft.CodeAnalysis (1)
CommandLine\AnalyzerConfig.SectionNameMatching.cs (1)
41return Regex.IsMatch(s);
Microsoft.CodeAnalysis.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (1)
304return Regex.IsMatch(s);
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (1)
304return Regex.IsMatch(s);
Microsoft.CodeAnalysis.CodeStyle (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (1)
304return Regex.IsMatch(s);
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.SingleLineRewriter.cs (1)
62if (s_newlinePattern.IsMatch(token.Text))
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.SingleLineRewriter.cs (1)
62if (s_newlinePattern.IsMatch(token.Text))
Microsoft.CodeAnalysis.Features (5)
CodeFixes\Configuration\ConfigurationUpdater.cs (4)
454if (s_optionEntryPattern.IsMatch(curLineText)) 562else if (!isGlobalConfig && s_headerPattern.IsMatch(curLineText.Trim())) 599if (headerRegex.IsMatch(relativePath)) 640else if (relativePath.IsEmpty() && new Regex(fileName).IsMatch(relativePath))
EmbeddedLanguages\Json\JsonParser.StrictSyntaxChecker.cs (1)
220return !s_validNumberRegex.IsMatch(literalText)
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (1)
304return Regex.IsMatch(s);
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SingleLineRewriter.vb (1)
46If s_newlinePattern.IsMatch(token.Text) Then
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SingleLineRewriter.vb (1)
46If s_newlinePattern.IsMatch(token.Text) Then
Microsoft.CodeAnalysis.Workspaces (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (1)
304return Regex.IsMatch(s);
Microsoft.Extensions.AI.Abstractions (1)
Functions\AIFunctionFactory.cs (1)
1156private static bool IsPotentiallyJson(string value) => PotentiallyJsonRegex().IsMatch(value);
Microsoft.Extensions.AI.Evaluation (2)
Utilities\ModelInfo.cs (2)
123=> !string.IsNullOrWhiteSpace(modelProvider) && KnownHostMonikersRegex.IsMatch(modelProvider); 130=> !string.IsNullOrWhiteSpace(modelProvider) && LocalMachineHostMonikerRegex.IsMatch(modelProvider);
Microsoft.Extensions.AI.Evaluation.Console (2)
src\Libraries\Microsoft.Extensions.AI.Evaluation\Utilities\ModelInfo.cs (2)
123=> !string.IsNullOrWhiteSpace(modelProvider) && KnownHostMonikersRegex.IsMatch(modelProvider); 130=> !string.IsNullOrWhiteSpace(modelProvider) && LocalMachineHostMonikerRegex.IsMatch(modelProvider);
Microsoft.Extensions.AI.Evaluation.Reporting (2)
src\Libraries\Microsoft.Extensions.AI.Evaluation\Utilities\ModelInfo.cs (2)
123=> !string.IsNullOrWhiteSpace(modelProvider) && KnownHostMonikersRegex.IsMatch(modelProvider); 130=> !string.IsNullOrWhiteSpace(modelProvider) && LocalMachineHostMonikerRegex.IsMatch(modelProvider);
Microsoft.Extensions.AI.Evaluation.Safety (2)
src\Libraries\Microsoft.Extensions.AI.Evaluation\Utilities\ModelInfo.cs (2)
123=> !string.IsNullOrWhiteSpace(modelProvider) && KnownHostMonikersRegex.IsMatch(modelProvider); 130=> !string.IsNullOrWhiteSpace(modelProvider) && LocalMachineHostMonikerRegex.IsMatch(modelProvider);
Microsoft.Gen.MetadataExtractor (2)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (2)
204if (!_regexTagNames.IsMatch(dynDim)) 508if (!_regex.IsMatch(metricNameFromMethod))
Microsoft.Gen.Metrics (2)
Parser.cs (2)
204if (!_regexTagNames.IsMatch(dynDim)) 508if (!_regex.IsMatch(metricNameFromMethod))
Microsoft.Gen.MetricsReports (2)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (2)
204if (!_regexTagNames.IsMatch(dynDim)) 508if (!_regex.IsMatch(metricNameFromMethod))
Microsoft.Maui.Controls.DesignTools (1)
ColorDesignTypeConverter.cs (1)
203 if (RxColorHex.Value.IsMatch(str))
Microsoft.Maui.Resizetizer (1)
Utils.cs (1)
16 => rxResourceFilenameValidation.IsMatch(Path.GetFileNameWithoutExtension(filename));
Microsoft.ML.Core (1)
ComponentModel\ComponentCatalog.cs (1)
969return _nameRegex.IsMatch(name);
Microsoft.ML.Data (1)
EntryPoints\EntryPointNode.cs (1)
1098return token?.Value != null && _variableRegex.IsMatch(token.Value<string>());
Microsoft.ML.Predictor.Tests (4)
CompareBaselines.cs (4)
236if (_matchIter.IsMatch(line1) != _matchIter.IsMatch(line2)) 240while (line1 != null && _matchIter.IsMatch(line1)) 245while (line2 != null && _matchIter.IsMatch(line2))
Microsoft.NET.Build.Containers (6)
ContainerHelpers.cs (4)
125internal static bool IsValidRegistry(string registryName) => ReferenceParser.AnchoredDomainRegexp.IsMatch(registryName); 135return ReferenceParser.anchoredNameRegexp.IsMatch(imageName); 146return ReferenceParser.anchoredTagRegexp.IsMatch(imageTag); 156return envVarRegex.IsMatch(envVar);
DigestUtils.cs (2)
56if (!s_registeredAlgorithms["sha256"].IsMatch(encoded)) 134if (!encodedPattern.IsMatch(encoded))
Microsoft.NET.Sdk.StaticWebAssets.Tasks (1)
ScopedCss\RewriteCss.cs (1)
171var firstDeepCombinator = allSimpleSelectors.FirstOrDefault(s => s_deepCombinatorRegex.IsMatch(s.Text));
Microsoft.TemplateEngine.Edge (1)
Mount\Archive\ZipFileDirectory.cs (1)
26return _mountPoint.Universe.Values.Where(x => x.FullPath.StartsWith(FullPath, StringComparison.Ordinal) && x.FullPath.Length != FullPath.Length && r.IsMatch(x.Name)).Where(x => searchOption == SearchOption.AllDirectories || x.FullPath.TrimEnd('/').Count(y => y == '/') == FullPath.Count(y => y == '/'));
Microsoft.TemplateEngine.Utils (8)
InMemoryFileSystem.cs (8)
202if (rx.IsMatch(entry.Key)) 235if (rx.IsMatch(current.Current.Key)) 279if (rx.IsMatch(entry.Key)) 316if (rx.IsMatch(entry.Key)) 362if (rx.IsMatch(entry.Key)) 372if (rx.IsMatch(entry.Key)) 404if (rx.IsMatch(current.Current.Key)) 411if (rx.IsMatch(entry.Key))
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\FileIO\TextFieldParser.vb (1)
1332If m_WhiteSpaceRegEx.IsMatch(token) Then
NuGet.Common (3)
PathUtil\PathResolver.cs (3)
31return filters.Any(f => f.IsMatch(path)); 150where searchRegex.IsMatch(file) 161where searchRegex.IsMatch(directory) && IsEmptyDirectory(directory)
NuGet.Configuration (1)
Proxy\WebProxy.cs (1)
74return _regExBypassList.Any(r => r.IsMatch(normalizedUri));
NuGet.Packaging (4)
Licenses\LicenseExpressionTokenizer.cs (1)
38return ValidCharactersRegex.IsMatch(_value);
Licenses\NuGetLicense.cs (1)
90return regex.IsMatch(value);
PackageCreation\Utility\PackageIdValidator.cs (1)
28return IdRegex.IsMatch(packageId);
Signing\Content\KeyPairFileReader.cs (1)
87if (NamePattern.IsMatch(key))
QuarantineTools.Tests (2)
QuarantineScriptTests.cs (2)
198Assert.True(rx1.IsMatch(norm), $"Expected to match M1 pattern, but did not.\nPattern: {rx1}\nText:\n{norm}"); 199Assert.True(rx2.IsMatch(norm), $"Expected to match M2 pattern, but did not.\nPattern: {rx2}\nText:\n{norm}");
RepoTasks (2)
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (2)
1031if (isSymlink && OpenSslHashFilenameRegex.IsMatch(file.Name)) 1035else if (OpenSslCertificateExtensionRegex.IsMatch(file.Name))
Roslyn.Diagnostics.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (1)
304return Regex.IsMatch(s);
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.SingleLineRewriter.cs (1)
62if (s_newlinePattern.IsMatch(token.Text))
sdk-tasks (1)
ZipFileCreateFromDirectory.cs (1)
84if (regex.IsMatch(file))
System.Configuration.ConfigurationManager (1)
System\Configuration\RegexStringValidator.cs (1)
30if (value is string s && !_regex.IsMatch(s))
System.Data.Common (12)
src\runtime\src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (1)
413bool compValue = ConnectionStringValidKeyRegex.IsMatch(keyname);
System\Data\Common\DBCommandBuilder.cs (7)
91if (!_parameterNameParser.IsMatch(columnName)) 134if (_parameterNameParser.IsMatch(DefaultIsNullPrefix)) 138else if (_parameterNameParser.IsMatch(AlternativeIsNullPrefix)) 142else if (_parameterNameParser.IsMatch(AlternativeIsNullPrefix2)) 150if (_parameterNameParser.IsMatch(DefaultOriginalPrefix)) 154else if (_parameterNameParser.IsMatch(AlternativeOriginalPrefix)) 158else if (_parameterNameParser.IsMatch(AlternativeOriginalPrefix2))
System\Data\Common\DbConnectionOptions.cs (4)
60if ((null == keyName) || !ConnectionStringValidKeyRegex.IsMatch(keyName)) 91!ConnectionStringQuoteOdbcValueRegex.IsMatch(keyValue)) 102else if (ConnectionStringQuoteValueRegex.IsMatch(keyValue)) 186if ((null == keyword) || !ConnectionStringValidKeyRegex.IsMatch(keyword))
System.Data.Odbc (5)
Common\System\Data\Common\DbConnectionOptions.cs (4)
122if ((null == keyName) || !ConnectionStringValidKeyRegex.IsMatch(keyName)) 152!ConnectionStringQuoteOdbcValueRegex.IsMatch(keyValue)) 163else if (ConnectionStringQuoteValueRegex.IsMatch(keyValue)) 447if ((null == keyword) || !ConnectionStringValidKeyRegex.IsMatch(keyword))
src\runtime\src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (1)
413bool compValue = ConnectionStringValidKeyRegex.IsMatch(keyname);
System.Data.OleDb (4)
DbConnectionOptions.cs (4)
187if ((null == keyName) || !ConnectionStringValidKeyRegex.IsMatch(keyName)) 217!ConnectionStringQuoteOdbcValueRegex.IsMatch(keyValue)) 228else if (ConnectionStringQuoteValueRegex.IsMatch(keyValue)) 766bool compValue = ConnectionStringValidKeyRegex.IsMatch(keyname);
System.DirectoryServices.AccountManagement (1)
System\DirectoryServices\AccountManagement\SAM\SAMQuerySet.cs (1)
341return regex.IsMatch(property);
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\DataContract.cs (1)
2264Globals.FullSRSInternalsVisibleRegex.IsMatch(internalsVisibleAttributeAssemblyName))
System.Private.Xml (2)
System\Xml\Schema\FacetChecker.cs (2)
875if (!regex.IsMatch(value)) 1459if (!LanguageRegex.IsMatch(s))
System.Text.RegularExpressions (9)
System\Text\RegularExpressions\Regex.Debug.cs (1)
60if (IsMatch(input))
System\Text\RegularExpressions\Regex.Match.cs (7)
32/// <see cref="Regex"/> object with the specified pattern and calling the <see cref="IsMatch(string)"/> 37RegexCache.GetOrAdd(pattern).IsMatch(input); 82/// <see cref="IsMatch(string)"/> instance method. The pattern is cached for rapid retrieval by the 87RegexCache.GetOrAdd(pattern, options, s_defaultMatchTimeout).IsMatch(input); 141/// <see cref="IsMatch(string)"/> instance method. The pattern is cached for rapid retrieval by the 154RegexCache.GetOrAdd(pattern, options, matchTimeout).IsMatch(input); 191/// The <see cref="IsMatch(string)"/> method is typically used to validate a string or to ensure that a
System\Text\RegularExpressions\Symbolic\UnicodeCategoryRangesGenerator.cs (1)
53if (whitespaceRegex.IsMatch(ch.ToString()))