Current location - Trademark Inquiry Complete Network - Futures platform - Python's re, findall ignores case
Python's re, findall ignores case
It's not as troublesome as those people say, just add a parameter, as follows:

Imported re

SHA = 'AC:B0:F3:26:EA:C 1 '

Results 1 = re.findall (r 'ac:. *: c 1', sha) # This is not searchable because the case does not match.

Result2 = re.findall (r 'ac:。 *: c 1', sha, re.ignorecase) # This is searchable, and the case has been ignored.

Print ('Do not ignore case search results:', results 1)

Print ("Ignore Case Search Results:", Result 2)

Results:

Running result