This commit is contained in:
marco
2020-06-14 22:46:10 +02:00
parent f31aed8925
commit fe92d9d581
+1 -1
View File
@@ -41,7 +41,7 @@ def printMatches(matches):
def find_single_match(data, patron, index=0): def find_single_match(data, patron, index=0):
try: try:
if index == 0: if index == 0:
matches = re.search(patron, data, flags=re.DOTALL) matches = re.search(patron, data, flags=re.DOTALL).groups()
else: else:
matches = re.findall(patron, data, flags=re.DOTALL) matches = re.findall(patron, data, flags=re.DOTALL)
return matches[index] return matches[index]