egrep on the 3b1 is weird!

Tom Tkacik tkacik at rphroy.ph.gmr.com
Sat Mar 23 05:33:11 AEST 1991


In article <GUEST.91Mar22115440 at geech.ai.mit.edu>, guest at geech.ai.mit.edu (Guest Account) writes:
|> Since without any kind of quoting or special chars a regular
|> expression is 1 character:
|> 	egrep 'foo|bar'
|> matches lines containing fooar and fobar.  That's why you need to use
|> parentheses.  You have to read the manual page for ed(1) to get the
|> rest of the story on regular expressions.  To quote the grep man page:

Sorry, try again.  Concatenation has higher precedence than '|'.

egrep 'foo|bar' will match either foo or bar, not fobar nor fooar.

egrep works like that here at work.  I have not yet tried it at home.  I will.
If it works as Kris A. Kugel says, then it must be busted.

-- 
Tom Tkacik				tkacik at clyde.cs.gmr.com
GM Research Labs			tkacik at kyzyl.mi.org
"I'm president of the United States, and I'm not going to eat anymore broccoli."
						--- George Bush



More information about the Comp.sys.3b1 mailing list