diff --git a/src/Build/Evaluation/Expander.cs b/src/Build/Evaluation/Expander.cs
index aef481962ab..05ad3902a6f 100644
--- a/src/Build/Evaluation/Expander.cs
+++ b/src/Build/Evaluation/Expander.cs
@@ -129,7 +129,7 @@ internal enum ExpanderOptions
///
///
+ internal partial class Expander
where P : class, IProperty
where I : class, IItem
{
@@ -952,7 +952,7 @@ internal static string ExpandMetadataLeaveEscaped(string expression, IMetadataTa
// if there are no item vectors in the string
// run a simpler Regex to find item metadata references
MetadataMatchEvaluator matchEvaluator = new MetadataMatchEvaluator(metadata, options, elementLocation, loggingContext);
- result = RegularExpressions.ItemMetadataPattern.Value.Replace(expression, new MatchEvaluator(matchEvaluator.ExpandSingleMetadata));
+ result = RegularExpressions.ItemMetadataRegex.Replace(expression, new MatchEvaluator(matchEvaluator.ExpandSingleMetadata));
}
else
{
@@ -983,7 +983,7 @@ internal static string ExpandMetadataLeaveEscaped(string expression, IMetadataTa
// Extract the part of the expression that appears before the item vector expression
// e.g. the ABC in ABC@(foo->'%(FullPath)')
string subExpressionToReplaceIn = expression.Substring(start, itemVectorExpressions[n].Index - start);
- string replacementResult = RegularExpressions.NonTransformItemMetadataPattern.Value.Replace(subExpressionToReplaceIn, new MatchEvaluator(matchEvaluator.ExpandSingleMetadata));
+ string replacementResult = RegularExpressions.NonTransformItemMetadataRegex.Replace(subExpressionToReplaceIn, new MatchEvaluator(matchEvaluator.ExpandSingleMetadata));
// Append the metadata replacement
finalResultBuilder.Append(replacementResult);
@@ -991,7 +991,7 @@ internal static string ExpandMetadataLeaveEscaped(string expression, IMetadataTa
// Expand any metadata that appears in the item vector expression's separator
if (itemVectorExpressions[n].Separator != null)
{
- vectorExpression = RegularExpressions.NonTransformItemMetadataPattern.Value.Replace(itemVectorExpressions[n].Value, new MatchEvaluator(matchEvaluator.ExpandSingleMetadata), -1, itemVectorExpressions[n].SeparatorStart);
+ vectorExpression = RegularExpressions.NonTransformItemMetadataRegex.Replace(itemVectorExpressions[n].Value, new MatchEvaluator(matchEvaluator.ExpandSingleMetadata), -1, itemVectorExpressions[n].SeparatorStart);
}
// Append the item vector expression as is
@@ -1008,7 +1008,7 @@ internal static string ExpandMetadataLeaveEscaped(string expression, IMetadataTa
if (start < expression.Length)
{
string subExpressionToReplaceIn = expression.Substring(start);
- string replacementResult = RegularExpressions.NonTransformItemMetadataPattern.Value.Replace(subExpressionToReplaceIn, new MatchEvaluator(matchEvaluator.ExpandSingleMetadata));
+ string replacementResult = RegularExpressions.NonTransformItemMetadataRegex.Replace(subExpressionToReplaceIn, new MatchEvaluator(matchEvaluator.ExpandSingleMetadata));
finalResultBuilder.Append(replacementResult);
}
@@ -2719,7 +2719,7 @@ internal static IEnumerable