Hello, Thomas! > > `+' isn't a portable literal. Some implementations seem to use it as > > a meta-character with the usual meaning, but without support for it > > after `*'. This was about grep, not egrep. GNU grep 2.4.2 (without -E) behaves correctly, but the point was that some other implementations may behave differently. > unless I missed a response, so far all that's been demonstrated is that a > newer version of GNU grep doesn't behave the same as other versions of > grep. It's probably a bug rather than a feature (bear in mind that > GNU grep has to keep track of whether it's supposed to be fgrep, grep or > egrep -- in the latter case, `+' would be a metacharacter). I haven't checked the older versions, but this behaviour of GNU grep is weird (it may or may not be a bug, dependent on the standard): $ echo foo |./grep -E ' *+' foo POSIXLY_CORRECT doesn't change anything. I'm going to report this problem to the GNU grep maintainers. Regards, Pavel Roskin
- Re: grep -E ? (Was: Compilation problem ... Thomas E. Dickey
- Re: grep -E ? (Was: Compilation problem ... Pavel Roskin
- AC_TRY_CPP too strict? (Was: grep -... Pavel Roskin
- Re: AC_TRY_CPP too strict? (Was: gr... Alexandre Oliva
- Re: AC_TRY_CPP too strict? (Was: gr... Pavel Roskin
- Re: AC_TRY_CPP too strict? (Was: gr... Thomas Dickey
- Re: AC_TRY_CPP too strict? (Was: gr... Alexandre Oliva
- Re: grep -E ? (Was: Compilation problem solved) Thomas E. Dickey
- Re: grep -E ? (Was: Compilation problem solved) Alexandre Oliva
- Re: grep -E ? (Was: Compilation problem solv... Thomas E. Dickey
- Re: grep -E ? (Was: Compilation problem ... Pavel Roskin
- Re: grep -E ? (Was: Compilation pro... Thomas E. Dickey
- Re: grep -E ? (Was: Compilation pro... Paul Eggert
- Re: grep -E ? (Was: Compilation pro... Thomas Dickey
- Re: grep -E ? (Was: Compilation pro... Paul Eggert
- Re: grep -E ? (Was: Compilation problem ... Paul Eggert
- Re: grep -E ? (Was: Compilation problem solved) Pavel Roskin
- Re: grep -E ? (Was: Compilation problem solved) Alexandre Oliva
- Re: grep -E ? (Was: Compilation problem solved) Pavel Roskin
- Re: grep -E ? (Was: Compilation problem solv... Alexandre Oliva
- Re: grep -E ? (Was: Compilation problem ... Pavel Roskin