Skip to content
Snippets Groups Projects
Commit 4eebb936 authored by Henning Glawe's avatar Henning Glawe
Browse files

end-anchor timespan RE with preceding rubber whitespace

all components of a 'timespan' are optional;
the existence of at least one component is ensured by explicit counting
as a safety net, end-anchor the RE with preceding rubber whitespace
parent b343a9ad
No related branches found
No related tags found
No related merge requests found
...@@ -213,7 +213,8 @@ class ParserQuantumEspresso(object): ...@@ -213,7 +213,8 @@ class ParserQuantumEspresso(object):
r"(?:\s*(?P<days>\d+)\s*d)?" + r"(?:\s*(?P<days>\d+)\s*d)?" +
r"(?:\s*(?P<hours>\d+)\s*h)?" + r"(?:\s*(?P<hours>\d+)\s*h)?" +
r"(?:\s*(?P<minutes>\d+)\s*m)?" + r"(?:\s*(?P<minutes>\d+)\s*m)?" +
r"(?:\s*(?P<seconds>" + RE_f + ")\s*s)?", r"(?:\s*(?P<seconds>" + RE_f + ")\s*s)?" +
r"\s*$", # all groups are optional, end-anchor with rubber-space
espresso_timespan) espresso_timespan)
if not match: if not match:
raise RuntimeError( raise RuntimeError(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment