I have the following sample data:
25.00
-5
-46.1
34.00
34.4
I am trying to use System.Text.RegularExpressions.Regex.Replace(testStr,“(^-?\d{1,9}.\d{1}$)”,testStr+“0”) to format the data to have two digits after the decimal for any items in the test data that only have one digit after the decimal. I have tried different version of the regex matching string (^-?\d+[.]\d{1}$), etc. None of these appear to match and I’m kind of at a loss as to why this isn’t working. I have tried using String.Format(testStr,“0.00”) to use the built-in formatting for this but this doesn’t work in UiPath no matter what I tried.