home / software / tips and tricks / String Replacement using RegularExpressions

String Replacement using RegularExpressions

Updated:  02/23/2012 07:02 AM
Author:  Shiju Mathews

Status:    Resolved.


Regex class in ‘System.Text.RegularExpressions’ domain has the static method ‘Regex.Replace’ method that can be used for String Replacements using patterns.



InPut: courtesyIndia.com
OutPut: courtesyIndia.com

Another Method:



The output will be '8132980366' because of the non digit charecter in _PhoneNumber will be replaced by empty spaces.
Tags: String Replacement using RegularExpressions
Updated on: November 2024