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

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


Regards,
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
System.Text.RegularExpressions.Regex.Match(str,“[0-9].*(?=RON)”).Value.Trim
Cheers!!
It worked for me. Thank you very much for your help.
It worked for me. Thank you very much for your help.
@Bedirhan_Ozkan
If you find solution for your query. Please mark it as solution to close the loop
Happy Automation
Regards
It worked for me. Thank you for your answer.
System.Text.RegularExpressions.Regex.Match(infoClientAmount,“(?<=Account Amount:\s+).*?(?=\s)”).Value
Fixing it this way worked better for me ![]()
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.