[ trimmed Cc:, added autoconf-patches; followups can remove gcc@ ] [ http://thread.gmane.org/gmane.comp.gcc.devel/108348 ]
* Dave Korn wrote on Wed, Aug 26, 2009 at 08:16:11PM CEST: > Ralf Wildenhues wrote: > > 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,[^/]*$,,'. > > [...] > > Portable `sed' regular expressions should use `\' only to escape > > characters in the string `$()*.0123456789[\^n{}'. > > Ah, I didn't read those two conditions as applying simultaneously. I don't think they apply simultaneously in the way you interpreted that. However, in the s,x\{1\,\},y, example, the comma is both a separator and another metacharacter. Hmm, maybe those sentences don't really cover this case. 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. ? Cheers, Ralf