I need only the amount from the string

I need only the amount from the string

Input :$1,463.81

expecting output : 1,463.81

Using regex we have to do .

thanks in advance

@ManjunathReddy

Please us the below mentioned regex

System.Text.RegularExpressions.Regex.Match(InputString,"(\d+.*)").Value

Regards

system.text.regularexpression.regex.match(inputstr,“\d+,\d+.\d+”).value

Hi @ManjunathReddy


\d+.*

Hi @ManjunathReddy

(?<=\$).*

image

HI @ManjunathReddy

System.Text.RegularExpressions.Regex.Match(YourString,"(?<=\$)\d.+").Tostring

image

@ManjunathReddy

Sysem.Text.RegularExpressions.Regex.Match(Input,"(?<=\$).*").Value

image

@ManjunathReddy

System.Text.RegularExpressions.Regex.Match(InputString,“(?<=$).*”).Value

image

Cheers!!

Hi @ManjunathReddy
Try this:

Input :"$1,463.81"
Output= System.Text.RegularExpressions.Regex.Match(Input,"[\d,.]+").Value


Check out below image for better understanding

Hope it helps!!

@
image

System.Text.RegularExpressions.Regex.Match(YourString,"[0-9,.]+").Tostring

Hi

Use assign activity and try this expression
StrVal = System.Text.RegularExpressions.Regex.Match(“InputString”,“(?<=$)\d.+”).Tostring

Thank you

we keep in mind for the following pattern
grafik

As the role of dot is:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.