I have a message eg. Bank of ABC, Building KLM, Block 35, India. And I have an excel with below values
|100||Bank of ABC|
I want to find if the bank name is present in the above message. So I converted the message as below by removing spaces/special characters/newlines:
And I also did same with the names and iterated through a loop.
so my condition was:
So it checks and provide value as below
- BANKOFABCBUILDINGKLMBLOCKf35INDIA.Contains (XYZ) -----------> False
- BANKOFABCBUILDINGKLMBLOCKf35INDIA.Contains(AB3CBANK) -----------> False
- BANKOFABCBUILDINGKLMBLOCKf35INDIA.Contains(BANKOFABC) -----------> True
- BANKOFABCBUILDINGKLMBLOCKf35INDIA.Contains(MB) -----------> True
So the 1, 2 and 3 are giving correct answers but the last (4th) should be “False” instead it is giving “True”. There is MB in it but it is not the proper word in the actual message(" Bank of ABC, Building KLM, Block 35, India")
Is there any other way to solve this??