I am searching a string [email protected] for 108352, this should return true. However if I search for a substring of this it should not return true. Eg if I searched for 08352, this is missing the 1 so that would be false. How should I accomplish this?
I was searching like this:
for item in parse:
if element in item:
where element is 08352 and parse is several strings in a list. This is returning the positives I don't want.
perhaps I should look for a pattern? After each string I search for is a @ I notice, also before each one is a 0. So perhaps a regex? And somehow incorporate it into my for and if?
Edit: what if I prepend "00" to the search string and add @ at the end? Like:
if "00"+access_point_id+"@" in item:
remodule has everything you need.