Julian Foad wrote: > Gert Jan van Loo wrote: > > If I change my pattern file to: > > Input [a-zA-Z0-9_]\+ is unused > > Now using "grep -f <patternfile> <source>" The patterns ARE > > found. Now using "egrep -f <patternfile> <source>" The patterns > > are NOT found. > > > > egrep seems to do the right thing. > > I thought "[a-zA-Z0-9_]+" is part of the standard grep. > > Even if it is not why does \+ suddenly work? > > All of this is working as intended,
Hmm, not quite: $ echo "My source contains many of: Input location is unused Input rstn is unused" >file $ grep --color "Input [A-Za-z]\+" file Input location is unused Input rstn is unused Here "Input" and the word after it are red. $ grep --color "Input [A-Z]\+" file Input location is unused Input rstn is unused Now there is no color. What is matched here? Why are these lines getting printed? Benno
