Regex.Replace Method
Within a specified input string, replaces strings that match a regular expression pattern with a specified replacement string.
ex.
// assigning value into the string xvalue.
string xvalue = "199 RemoveText";
// removing character and leave numbers
decimal value = (decimal)Regex.Replace(xvalue, @"[\D]", "");
//As the result:
199
Search
Wednesday, March 11, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment