How to Check dollar amount listed after line that reads using Regex

Hello,

Can anyone please help me on this Regex part…

How to check using Regex whether dollar amount listed after line that reads “2nd Loan Amount :”
Sometimes the dollar amount may not be available. In my workflow if it is available then it will proceed or if it is not available then it should log message as dollar amount not exits

[If Applicable] 2nd Loan Amount: 100,000.00

image

Hi,

How about the following expression?

System.Text.RegularExpressions.Regex.IsMatch(yourString,"(?<=2nd Loan Amount:\s*)\d[.,\d]*")

Regards,

Hi @tkiran ,
Try below Regex pattern
(?<=2nd Loan Amount: )[0-9][0-9,\.]+
image

Refer below path

Regards,
Arivu

Hi @tkiran

Another pattern look into this

System.Text.RegularExpressions.Regex.Match(inputString,"(?<=2nd Loan Amount: )[\d,\.]*").Tostring.Trim

image

Regards
Gokul

Hi Yoichi,

Its work perfectly !!!.. Thank you so much

one more thing if dollar amount exits then how to replace [If Applicable]

1 Like

Hi,

Glad to seem your problem has been solved.

Regards,

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