I have a line like this:
BlockedMatch(XA, YB), Correlation(XA, QC), Correlation(YB, QC), Correlation(QC, YB)
I want it to look like this:
BlockedMatch(XAYB), Correlation(XAQC), Correlation(YBQC), Correlation(QCYB)
I can't just do a replace on ", " because it will remove those instances that exist outside of the parentheses.
I tried this:
replaceAll("\((.*?)\)", "")
which replaces everything inside the parentheses (not just the comma). I've tried to add just the comma and space combination into that regex, but it doesn't seem to remove anything then.
Could someone show me how to specify to only remove the ", "
(comma-space) when it occurs inside parentheses?