Regular expression to get "min" and "sec" from time control strings

Sort:
Avatar of ayme97

Hi,

I am developing a chess website and I am looking for a python regular expression to convert something like "10+0" to {min:10, sec:0}. It is not so easy as I found strings like "40 tahov/90 min. + 30 min., 30 sek./tah", "2h für 40 Züge +1h bis zum Ende", "1u", etc.

Someone had the same problem before. A good practical aproach would be enough, not looking for a 100% perfection as there are a lot of edge cases. Something as easy as possible to match most string cases.

Thanks, have a nice day.

A developer who loves chess

Avatar of wutmidoin
I recently interviewed a woman who taught herself Python, but she wasn’t a fit for the role I’m hiring. If you’re looking to hire someone, I can see about connecting you.
Avatar of Guest6346675300
Please Sign Up to comment.

If you need help, please contact our Help and Support team.