POSIX says this (and SUSv2 has very similar language)

 The ':' matching operator shall compare the string resulting from the
 evaluation of expr1 with the regular expression pattern resulting from
 the evaluation of expr2. Regular expression syntax shall be that defined
 in 2.8.3 (Basic Regular Expressions), except that all patterns are
 ``anchored'' to the beginning of the string (that is, only sequences
 starting at the first character of a string shall be matched by the
 regular expression) and, therefore, it is unspecified whether ^ is a
 special character in that context.

If you can get the standards folks to change that wording,
I'll be happy to make GNU expr follow suit.

[EMAIL PROTECTED] (Greg A. Woods) writes:
| This warning is annoying:
|
|       $ gexpr "foobarnone" : '^foo'
|       gexpr: warning: unportable BRE: `^foo': using `^' as the first character
|       of the basic regular expression is not portable; it is being ignored
|       3
|
| Even worse is the fact that this warning is *WRONG*.
...

Reply via email to