, , RegularExpression.
, ...
Imports System.Text.RegularExpressions 'Need to import the namespace
Dim resultNumber As String = Regex.Replace(TextBox1.Text, "-", String.Empty) 'Do a simple replace on "-"
On the other hand, you are doing a simple replacement on one line, so the answer you accepted would be more appropriate in this case. Regular expressions, in my opinion, are good when working with templates, etc.
source
share