Specific choices with LİNQ

image

How can I choose between account amount and ron with linq?

Hi,

It seems not LINQ matter but string manupilation matter such as regex, split etc.

How about the following expression?

System.Text.RegularExpressions.Regex.Match(yourString,"(?<=Account Amount:\s+).*?(?=\s+RON)").Value

image

image

Regards,

1 Like

Hi @Bedirhan_Ozkan

yourInputString= "Client ID: AD55686
                  Account Number: 578349
                  Account Amount: 46568 RON"

Output= System.Text.RegularExpressions.Regex.Match(yourInputString, "Account Amount: (\d+)").Groups(1).Value

yourInputString and Output are of DataType System.String

Check out the below image for better understanding:

Regards

1 Like

@Bedirhan_Ozkan

System.Text.RegularExpressions.Regex.Match(str,“[0-9].*(?=RON)”).Value.Trim

Cheers!!

1 Like

It worked for me. Thank you very much for your help.

It worked for me. Thank you very much for your help.

1 Like

@Bedirhan_Ozkan
If you find solution for your query. Please mark it as solution to close the loop

Happy Automation

Regards

1 Like

It worked for me. Thank you for your answer.

1 Like

System.Text.RegularExpressions.Regex.Match(infoClientAmount,“(?<=Account Amount:\s+).*?(?=\s)”).Value

Fixing it this way worked better for me :slight_smile:

1 Like

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