^(?:([0-9]+):)??(?:([0-9]+):)?([0-9]+)(?:[.,]([0-9]+))?[^0-9]* $
This is a regular expression that my professor wrote for me in R studio for getting olympic results from a website. Can someone explain me with some level of details what exactly each part of the regular expression does and how does work all together.
Some examples of results that this regular expression is used for are:
3:49:03
, 1:21:08
, 49,03
, 3:42,02
.
Thank you for all the help in advance.