Regular expression to get number from string

hello,
i have strings like this

(* 10.00_)
(* 22,000_)

Desired output
10.00
22000

I need to keep the decimal if it is there. RIght now, i am doing replace with the expression “\D” -Regex.Replace(x.Field(Of Object)(“Ext amount”).ToString,“\D”,“”)

However, when there is a decimal such as 10.00, it gives me the value 1000.

Thanks in advance

@Sarah_Tang
give a try on
grafik

and refer on groups
grafik
(\d+\.?)(?:\,?)(\d+)

As an alternate: catch also comma and replace it afterwards
grafik

>Regex.Matches("(* 10.00_) (* 22,000_)","[\d,.]+").Cast(Of Match).Select(Function (m) m.Value.Replace(",","")).toArray
<- string[2] { "10.00", "22000" }

Following your direction for replacing the unwanted you can try:
grafik

For some additional starter help have a look here: