Hi , i want to check under if condition if my string contains only grades such as A or A+ or B or B+ and nothing else inside it how to check that inside if condition
Hi @ashish_negi
Strict matching place would need Equals as comparison and not contains.
lets say if these grades are stored in a datatable
You put a loop for each row
put an if condition
currentRow(“Grades”).toString.Equals(“A”) or currentRow(“Grades”).toString.Equals(“A+”) or currentRow(“Grades”).toString.Equals(“B”) or currentRow(“Grades”).toString.Equals(“B+”)
In the then section perform your logics.
Happy Automation!
Hi,
Can you try as the following?
arrKeyword ={"A","A+","B","B+"}
Then
arrKeyword.Contains(yourString)
Regards,
This worked
Thanks for replying this also helped
Hi yoichi, thanks for replying
What does it means here $ |\z
$ as i know it’s use for end of the string others ?
taken from regex101.com
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.