On my Tiger setup, \0 does *not* work with the default installed sed. However, it works fine with the MacPorts-installed gsed (GNU sed) without using ERE's. The gsed man page contains only this:
Code:
s/regexp/replacement/
Attempt to match regexp against the pattern space. If success-
ful, replace that portion matched with replacement. The
replacement may contain the special character & to refer to that
portion of the pattern space which matched, and the special
escapes \1 through \9 to refer to the corresponding matching
sub-expressions in the regexp.
There's no mention of \0, although it seems to work. The gsed man page lists the version as 4.1.4, February 2006.
|