How about

      Patterns should not include the separator (unless escaped), even
      as part of a character class.  In conformance with Posix, the Cray
      `sed' rejects `s/[^/]*$//': use `s,[^/]*$,,'.  Even escaped,
      patterns should not include separators that are also used as
      metacharacters.  For example, GNU sed 3.02 rejects `s,x\{1\,\},,',
      and is used on MinGW.

?

Yes, that's nice, except I would remove "and is used on MinGW".

By the way even sed 4.0.x has that interpretation. Another semantic change is s|a\|b|c| which is alternation up to sed 4.0.x included, but in sed 4.1.x and above.

The reason is that sed up to 4.0.x passes the backslash to the regex matcher (causing trouble with \,) while 4.1.x strips it.

Paolo


Reply via email to