RE: [Regexp] inverse matching such as [^a] not working

"jon" <[email protected]>
Newsgroups gmane.comp.gnu.regexp
Message-ID <[email protected]>
> This is how I invoked grep.
>
> cat foo | grep -e '[^a]\+'

[snip]

> Doesn't the preceeding grep
> invocation mean "look for strings that do not contain an `a'?  I

No. It means "look for strings that contain one or more characters that are
not a."

Which begs the question... you say the output of that command is the entire
file. For me, it's everything except the first line (a by itself).

Keep in mind that newlines could affect this depending upon whether they are
stripped by your implementation of grep.

Later
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.