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