I’m trying to validate the city from full address using look up table of having cities info in DB using contains method, I’m able to match the cities from the full address but it is giving result as true even for the cities which has extra character at the first or last.
Please see the below example:
6048 Belladonna Cir NLas Vegas, NV 89142
From the above address, city is Las Vegas but it is having an extra character as N at the starting in my DB the cities look up table has info as Las Vegas, as per my task it should through False status but it is giving the result as True.
Input: 6048 Belladonna Cir NLas Vegas, NV 89142.contains(Las Vegas.ToTrim)
Result: Should be False but it is returning True.
It should validate the exact word(City) from the given input address
Can any one help me in fixing this issue