-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ignore ahb tables where no pruefi is provided #371
ignore ahb tables where no pruefi is provided #371
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
pattern = r"Prüfidentifikator(?:\t){0,10}\t\d+" | ||
# "matches "Prüfidentifikator" followed by at least 1 tab separated numbers, max 11 pruefis is chosen arbitrarily | ||
return bool(re.search(pattern, table.row_cells(0)[-1].text)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hf-kklein gab es hier nicht noch ein anderes pattern was das pattern irgendwie compiled hat?
Ziel war es dass das regex nur einmal ausgeführt werden muss.
Oft haben wir das pattern global ausgelagert und dann in der Funktion nur angewendet.
Weißt du was ich meine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my_pattern = re.comile(r"Prüfidentifikator(?:\t){0,10}\t\d+")
und dann mypattern.search(...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bringt dann was, wenn die funktion sehr oft aufgerufen wird. wobei auch so der regex-teil einen internen cache hat iirc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah okay. Die Funktion wir in jeder Tabelle aufgerufen. Aber wenn sie einen internen Cache hat passt das.
No description provided.