I have various kinds of inputs like $1.30
, $0.30
, 1.3Rs.
, 13EUR
How can i get the only integer value like $1.30 = 1
, $0.30=0
, 100.3Rs. = 100
, 13EUR = 13
I have various kinds of inputs like $1.30
, $0.30
, 1.3Rs.
, 13EUR
How can i get the only integer value like $1.30 = 1
, $0.30=0
, 100.3Rs. = 100
, 13EUR = 13
You can use a regex to extract the data as you dont seem to care about the decimals
Regex.Match(yourString, "\\d+")
And then you can cast the results you get from the match