In a specified input string, replaces all strings that match a regular expression pattern with a specified replacement string.
Namespace:
RainWorx.FrameWorx.MVC.HelpersAssembly: RainWorx.FrameWorx.MVC (in RainWorx.FrameWorx.MVC.dll) Version: 3.5
Syntax
C#
public static string ReplaceRegEx( this string input, string pattern, string replacement )
Parameters
- input
- Type: SystemString
input string - pattern
- Type: SystemString
regular expression pattern - replacement
- Type: SystemString
the replacement string
Return Value
Type: Stringthe resulting string with all matches replaced
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).See Also