On Tue Jul 5 10:02:56 EDT 2011, rudolf.syk...@gmail.com wrote: > > there should be no match to the re $junk. > > it's impossible for there to be text after then > > end of line. > > 1) from the regexp grammer, $junk is a valid regexp
i believe you've read incorrectly. but if you think it parses, what production produces e3 en? but that wasn't actually my point. > 2) grep checks input line-by-line > 3) the answer to a question whether a *line* complies with '$whatever' > is --- I believe --- undefined. (It definitely should match '$'; > however comparing with '$whatever' gets us outside the definitions). supposing that $whatever does parse, it would match a line with 'whatever' following the end of the line. by definition there is no such line. - erik