Open Kihltech opened 4 years ago
Rather than keeping 20[012]
which restricts the years. Why not keep it 20[0-9]
? It does open the wrong combination. But we can later add a check of strlen
in a try block?
I was running in the same problem and changed your source code as YashasviMantha was suggesting. I simply changed the year pattern in the "pattern.py"file
from:
('year', '([\[\(]?((?:19[0-9]|20[01])[0-9])[\]\)]?)')
to:
('year', '([\[\(]?((?:19[0-9]|20[0-9])[0-9])[\]\)]?)')
Like this the code covers years till 2099. Don't understand why the code should be more limiting and in 2099 we can revisit this issue :-).
@divijbindlish please insert this in your code to avoid others running into the same issue ... we are beyond 2019 by now.
pattern.py:
from
('year', '([\[\(]?((?:19[0-9]|20[01])[0-9])[\]\)]?)')
to:
('year', '([\[\(]?((?:19[0-9]|20[012])[0-9])[\]\)]?)')