Using Python 3.9 on MacOS (if it matters) I have the following boolean test that uses regular expressions to search for a pattern in a string:
found = bool(re.search(pattern, string, re.IGNORECASE))
This boolean is not a literal search. For example, the strings Z97.11 and Z98.811 come back with a pattern of .1. And that is correct for a regular expression - but I want the boolean to be true with Z97.11 only and not Z98.811 for a literal search using re.search.
The literal search also has to be case insensitive.