src/NuGetGallery.Core/Extensions/RegexEx.cs
/// <summary>
/// In a specific input string, replaces all substrings that match a specified regular expression.
/// Throws a <see cref="RegexMatchTimeoutException"/> if the timeout is reached.
/// </summary>
/// <param name="input">The string to search for matches.</param>
/// <param name="pattern">The regular expression pattern to match.</param>
/// <param name="evaluator">The handler to replace matches.</param>
/// <param name="options">A bitwise combination that provide options for matching.</param>
/// <returns>A new string with the matches replaced.</returns>
/// <exception cref="RegexMatchTimeoutException">Thrown if the matches exceed the default timeout.</exception>
In a specific input string, replaces all substrings that match a specified regular expression.
Throws a  if the timeout is reached.
In a specific input string replaces all substrings that match a specified regular expression . Throws a if the timeout is reached .
public static string ReplaceWithTimeout(
            string input,
            string pattern,
            string replacement,
            RegexOptions options)
        {
            return Regex.Replace(input, pattern, replacement, options, Timeout);
        }
public static string ReplaceWithTimeout ( string input , string pattern , string replacement , RegexOptions options ) { return Regex . Replace ( input , pattern , replacement , options , Timeout ) ; }
In a specific input string, replaces all substrings that match a specified regular expression.
In a specific input string replaces all substrings that match a specified regular expression .
A new string with the matches replaced.
A new string with the matches replaced .
Thrown if the matches exceed the default timeout.
Thrown if the matches exceed the default timeout .
input
string
The string to search for matches.
The string to search for matches .
pattern
string
The regular expression pattern to match.
The regular expression pattern to match .
replacement
string
options
RegexOptions
A bitwise combination that provide options for matching.
A bitwise combination that provide options for matching .
evaluator
The handler to replace matches.
The handler to replace matches .