C# Code:
static string ExtractNumbers(string expr)
{
return string.Join(null, System.Text.RegularExpressions.Regex.Split(expr, "[^\\d]"));
}
VB.NET Code:
Shared Function ExtractNumbers(ByVal expr As String) As String
Return String.Join(Nothing, System.Text.RegularExpressions.Regex.Split(expr, "[^\d]"))
End Function
No comments:
Post a Comment