From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Tue, 5 Jul 2011 10:06:15 -0400 To: 9fans@9fans.net Message-ID: In-Reply-To: References: <201107050956.18175.dexen.devries@gmail.com> <6f23779eaf1a84b58aa569a370e413cb@ladd.quanstro.net> <7e1b88d2eda348d9ea703e50b378a2e8@coraid.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] grep (or perhaps regex(6)) question Topicbox-Message-UUID: fadcac56-ead6-11e9-9d60-3106f5b1d025 On Tue Jul 5 10:02:56 EDT 2011, rudolf.sykora@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