| The POSIX standard says:
|
| Usually, the matching operator shall return a string representing
| the number of characters matched ('0' on failure). Alternatively,
| if the pattern contains at least one regular expression
| subexpression "[\(...\)]", the string corresponding to "\1" shall
| be returned.
|
| This leaves it ambiguous as to what expr 'a' : '\(b\)' should return.
| One could easily argue that it should be '0'. But in practice,
| GNU/Linux and Solaris expr both return the empty string, under the
| theory that the operation is returning a string.
Thanks for the information. May I include as are those two paragraphs
in the documentation? In particular are there any license issues wrt
POSIX snippets?
| By the way, In reviewing the latest AS_DIRNAME I see a quoting
| problem. AS_DIRNAME_SED shell-quotes its argument, but
| AS_DIRNAME_EXPR doesn't. This needs to be handled consistently.
Yep, indeed. Thanks. I prefer the non-quoted version.
| Also, in looking at the callers of AS_DIRNAME, I see that some callers
| quote their arguments, but some don't. This also needs to get fixed.
Right, I'll handle this.