> While we already determined that the expression is using the non-portable > \|, and thus using --posix is allowed to change the behavior, I think we > have also found an actual bug in sed 4.2.
Not a bug, sed --posix disables \| altogether (and \+, \?, \<, \>, etc.). Unless you had something different in mind? > My preference would be that > 'sed --posix' failed with a verbose error message when undefined input > like \| is detected, rather than silently changing behavior. This is hard, since regex does not have a flag for "fail on this escape", just for "enable/disable this escape". Paolo