diff --git a/ICD.Common.Utils/RegexUtils.cs b/ICD.Common.Utils/RegexUtils.cs
index 727de4d..0db86a2 100644
--- a/ICD.Common.Utils/RegexUtils.cs
+++ b/ICD.Common.Utils/RegexUtils.cs
@@ -44,7 +44,7 @@ namespace ICD.Common.Utils
///
public static string ReplaceGroup(string input, string pattern, string groupName, string replacement)
{
- return ReplaceGroup(input, pattern, groupName, match => replacement);
+ return ReplaceGroup(input, pattern, groupName, replacement, RegexOptions.None);
}
///
@@ -56,6 +56,34 @@ namespace ICD.Common.Utils
///
///
public static string ReplaceGroup(string input, string pattern, string groupName, Func replacement)
+ {
+ return ReplaceGroup(input, pattern, groupName, replacement, RegexOptions.None);
+ }
+
+ ///
+ /// Uses the pattern to replace the specified group with the provided replacement string.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static string ReplaceGroup(string input, string pattern, string groupName, string replacement, RegexOptions options)
+ {
+ return ReplaceGroup(input, pattern, groupName, match => replacement, options);
+ }
+
+ ///
+ /// Uses the pattern to replace the specified group with the provided replacement string.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static string ReplaceGroup(string input, string pattern, string groupName, Func replacement, RegexOptions options)
{
MatchEvaluator evaluator =
m =>
@@ -81,7 +109,7 @@ namespace ICD.Common.Utils
return sb.ToString();
};
- return Regex.Replace(input, pattern, evaluator);
+ return Regex.Replace(input, pattern, evaluator, options);
}
}
}