perlgolf hole - Translate within Parentheses

Hole type: one-liner

Write a one-liner to read lines of input such as 12:ab:(##:45:X:3).:(31:3):2 and convert all the : to - but only inside the parentheses. Parentheses will be balanced; they will not be nested.

e.g.
12:ab:(##:45:X:3).:(31:3):2
->
12:ab:(##-45-X-3).:(31-3):2

Solution