/// <summary> /// Splits an input string into an array of substrings at the positions defined by a regular expression pattern. /// </summary> /// <param name="input">The string to search for a match.</param> /// <param name="pattern">The regular expression pattern to match.</param> /// <returns> /// An array of strings. /// </returns> public string[] Split(string input, CompiledRegex pattern) { return pattern.Split(input); }
/// <summary> /// Searches the specified input string for all occurrences of a specified regular expression. /// </summary> /// <param name="input">The string to search for a match.</param> /// <param name="pattern">The regular expression pattern to match.</param> /// <returns> /// A collection of the <see cref="Match" /> objects found by the search. /// If no matches are found, the method returns an empty collection object. /// </returns> public MatchCollection Matches(string input, CompiledRegex pattern) { return pattern.Matches(input); }
/// <summary> /// In a specified input string, replaces all strings that match a specified /// regular expression with a specified replacement string. /// </summary> /// <param name="input">The string to search for a match.</param> /// <param name="pattern">The regular expression pattern to match.</param> /// <param name="replacement">The replacement string.</param> /// <returns> /// A new string that is identical to the input string, except that the replacement /// string takes the place of each matched string. /// </returns> public string Replace(string input, CompiledRegex pattern, string replacement) { return pattern.Replace(input, replacement); }
/// <summary> /// Indicates whether the regular expression finds a match in the input string. /// </summary> /// <param name="input">The string to search for a match.</param> /// <param name="pattern">The regular expression pattern to match.</param> /// <returns> /// <c>true</c> if the regular expression finds a match; otherwise, <c>false</c>. /// </returns> public bool IsMatch(string input, CompiledRegex pattern) { return pattern.IsMatch(input); }
/// <summary> /// Searches the specified input string for the first occurrence of the specified regular expression. /// </summary> /// <param name="input">The string to search for a match.</param> /// <param name="pattern">The regular expression pattern to match.</param> /// <returns> /// An object that contains information about the match. /// </returns> public Match Match(string input, CompiledRegex pattern) { return pattern.Match(input); }
/// <summary> /// Splits an input string into an array of substrings at the positions defined by a regular expression pattern. /// </summary> /// <param name="input">The string to search for a match.</param> /// <param name="pattern">The regular expression pattern to match.</param> /// <returns> /// An array of strings. /// </returns> public string[] Split(string input, CompiledRegex pattern) { return(pattern.Split(input)); }
/// <summary> /// In a specified input string, replaces all strings that match a specified /// regular expression with a specified replacement string. /// </summary> /// <param name="input">The string to search for a match.</param> /// <param name="pattern">The regular expression pattern to match.</param> /// <param name="replacement">The replacement string.</param> /// <returns> /// A new string that is identical to the input string, except that the replacement /// string takes the place of each matched string. /// </returns> public string Replace(string input, CompiledRegex pattern, string replacement) { return(pattern.Replace(input, replacement)); }
/// <summary> /// Searches the specified input string for all occurrences of a specified regular expression. /// </summary> /// <param name="input">The string to search for a match.</param> /// <param name="pattern">The regular expression pattern to match.</param> /// <returns> /// A collection of the <see cref="Match" /> objects found by the search. /// If no matches are found, the method returns an empty collection object. /// </returns> public MatchCollection Matches(string input, CompiledRegex pattern) { return(pattern.Matches(input)); }
/// <summary> /// Searches the specified input string for the first occurrence of the specified regular expression. /// </summary> /// <param name="input">The string to search for a match.</param> /// <param name="pattern">The regular expression pattern to match.</param> /// <returns> /// An object that contains information about the match. /// </returns> public Match Match(string input, CompiledRegex pattern) { return(pattern.Match(input)); }
/// <summary> /// Indicates whether the regular expression finds a match in the input string. /// </summary> /// <param name="input">The string to search for a match.</param> /// <param name="pattern">The regular expression pattern to match.</param> /// <returns> /// <c>true</c> if the regular expression finds a match; otherwise, <c>false</c>. /// </returns> public bool IsMatch(string input, CompiledRegex pattern) { return(pattern.IsMatch(input)); }