/ start of regex
\.? zero or one literal dot
(?:.*\.)+ a group occurring one of more time (see below)
(.*) a capture group capturing any number
of any characters until the end of the line
/ end of regex
The first group consists of: any number of any characters (except new line) followed by a literal dot.
Overall, this seems to be looking for file and directory names and trying to capture the extension.