Google Patents does not have an official API. There is SerpAPI if you are willing to pay, and the free official APIs, such as ...
If you want to verify "AB.12" but "ABx12" is also passing, check if the dot is being specified as a literal character. In Python's regular expressions, . usually matches any character except a newline ...