Could someone please help me to understand the syntax inside the replace function?
What you see is a regular expression. Regular expressions have a special syntax to specify patterns.
In this regex the [...] means a character group. The character group here is filled with \( (the open bracket), \) (the closing bracket) and \d (digits).
The + at the end means "one or more" so we specify that the pattern consists out of sequence of the characters in the character group. So a string like '142(2' will match the regex.
You replace all substrings in the string that match with that pattern by the empty string, so you remove them.
A useful tool to build, test, and fix regexes, is regex101. If you follow the link you can specify a regex and see what strings that do match the described pattern. At the right side there is a panel that aims to explain in natural language what the pattern is doing.
Furthermore there is this regex visualizer that shows the structure of the regex:

A substring "matches" if you can follow the railroads until you reach your destination, so here we can keep cycling through the gray box as long as there is an open bracket, closing bracket or a digit until we decide to hit the finish.
(,)and digit (0to9) with the empty string so it removes these characters.