Regex not replacing text in Calc macro editor

I have some text like (1, 15) and I want to swap the two digits and subtract one from each. My regex in the search window is as such

\((\d+)\,\ +(\d+)\)

and my replace line is

($2, $1)

What this does is just put in the line literally, without replacing the $n references.

Exasperated, please help.

Shouldn’t the outer () be escaped in the regex? Otherwise, the $1 and $2 would point to something different than expected, and you end up with double parentheses.

But indeed, it works as you describe. Please file a bug report.

what exactly means Calc macro editor ?

Alt+T MOB (Tools → Macros → Organize Macros → Basic…).