On 08/27/2009 02:36 PM, Eric Blake wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Ralf Wildenhues on 8/26/2009 12:22 PM:

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,

I'd rather recommend 's|[^/]*$||' instead, consistent with the rest of our
recommendations to prefer | over non-shell-metacharacters.

We should change that recommendation, since escaping | with \| is not portable, while for example :, # or % are portable in practice (I know of no regex engine where anyof \[:#%] is special).

Suggesting the comma however is definitely a bad idea.

I guess you were trying to point out that GNU sed 3.02 is what is
currently in use on MinGW?  That wording came across a bit awkwardly; how
about:

For example, MinGW ships with GNU sed 3.02, which rejects `s,x\{1\,\},,'.

Agreed.

Paolo


Reply via email to