Make matching for time shifts (in paranthesis) non-greedy, stopping at first closing paren
This commit is contained in:
parent
2be463c04d
commit
9449f1dad3
1 changed files with 1 additions and 1 deletions
|
@ -90,7 +90,7 @@ timelog['description'] = (np.where(timelog['description'].str.contains(': '), ti
|
||||||
timelog['description'] = timelog['description'].str.strip()
|
timelog['description'] = timelog['description'].str.strip()
|
||||||
timelog['project'] = timelog['project'].str.strip()
|
timelog['project'] = timelog['project'].str.strip()
|
||||||
|
|
||||||
timelog['tmp_timeshift'] = timelog['description'].str.extract(r'^(\(.+)\)', expand=False)
|
timelog['tmp_timeshift'] = timelog['description'].str.extract(r'^(\(.+?)\)', expand=False)
|
||||||
timelog['tmp_timeshift'] = timelog['tmp_timeshift'].str.strip().str.replace("(","", regex=False)
|
timelog['tmp_timeshift'] = timelog['tmp_timeshift'].str.strip().str.replace("(","", regex=False)
|
||||||
# In an ideal world we would use https://github.com/bear/parsedatetime or similar and
|
# In an ideal world we would use https://github.com/bear/parsedatetime or similar and
|
||||||
# even better figure out the right date for strings like "Monday" but eh this'll do.
|
# even better figure out the right date for strings like "Monday" but eh this'll do.
|
||||||
|
|
Loading…
Reference in a new issue