More than two years later, now on Xcode version 3.1.3, and this is still helpful info.

As for the numbering of the capture groups as replacements (of the form backslash-digits), it appears that 0 (zero) yields the *entire* matched string (which seems to be implicitly defined as a capture group), whilst 1 (one) yields the first capture group that is explicitly defined in the match string.

Now, why this isn't in the Xcode documentation anywhere, even after all these years, is quite a mystery (right next to the original question of why Apple used a different replacement notation than the ICU package uses).