Need to extract a Amount value fully in a string

Hi All,

It is a bit urgent can any one please help me asap on this

I have a string variable like
THERE IS A HOLD OF $16.29 ON YOUR or
THERE IS A HOLD OF $195,326.530 O
THERE IS A HOLD OF $335.53 ON YOUR or
THERE IS A HOLD OF $323.00 ON YOUR or
THERE IS A HOLD OF $11,342.43 ON Y or
THERE IS A HOLD OF $31,305.87 ON Y
i need to extract amount after Dollar value , ON also is not fixed after amount value if the amount value is bigger right side characters will be reduced

Here you go. I’ve assigned a variable to the string you’ve given us and run a regex on it to get the values. I’m logging the data to the output to show that I’m scraping the correct data.

Processusvierge.zip (11,9 Ko)

Happy automation!

Hello,

Please use below code in invoke code activity which will return desired amount :

Dim inputValue As String =“THERE IS A HOLD OF $16.29 ON YOUR”

outarg =inputValue.Substring (inputValue .IndexOf ("$")).Trim

outarg =outarg .Substring (0,outarg.IndexOf (" ") )

out_arg will return you the value ,in this case it will be 16.29

Thanks Anthony it was working fine, thanks for your support