Skip to content
Snippets Groups Projects
Commit c8b3b46e authored by Haak, R. (Romeo)'s avatar Haak, R. (Romeo)
Browse files

Regex could be done in one step instead of 2.

parent 0ac78a7d
No related branches found
No related tags found
1 merge request!82Sc 129/wrapper
......@@ -54,12 +54,10 @@ class Utils:
Returns:
the reduced path
"""
match = re.search(f"{participant}\D+{video}+\.T", path)
match = re.search(f"{participant}_(\D+){video}+\.T", path)
task = None
if match:
key = match.group()[:-2]
task_match = re.search("_(\D+)\d+",key)
task = task_match.group(1)
task = match.group(1)
return task
@staticmethod
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment