Replace that reusing searched text: Look at this example: //remove multiple white-spaces System.Text.RegularExpressions.Regex re = new System.Text.RegularExpressions.Regex( @”(\s)\s+” ); ret = re.Replace(ret, “$1″); As we can see, we use $1 to retriev the searched text reside in the 1st parentheses. So the rule is to use $# with # is the order number of the [...]
Archive for the ‘C#’ Category
[C#] Regular Expression
Posted in C# on March 21, 2010 | Leave a Comment »