Get only numbers from string

前端 未结 8 542
耶瑟儿~
耶瑟儿~ 2021-01-01 15:37

i want to get only numbers from string.

Lest say that this is my string :

324ghgj123

i want to get:

324123
8条回答
  •  礼貌的吻别
    2021-01-01 16:19

    Function that returns string without digits

    Public Function _RemoveNonDigitCharacters(S As String) As String
            Return New String(S.Where(Function(x As Char) System.Char.IsDigit(x)).ToArray)
    End Function
    

提交回复
热议问题