Path: csiph.com!goblin3!goblin.stu.neva.ru!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Ben Hanson Newsgroups: comp.compilers Subject: Re: Regular expression string searching & matching Date: Mon, 12 Mar 2018 15:46:21 -0700 (PDT) Organization: Compilers Central Lines: 8 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <18-03-046@comp.compilers> References: <18-03-016@comp.compilers> <18-03-032@comp.compilers> <18-03-034@comp.compilers> <18-03-035@comp.compilers> <18-03-041@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="34613"; mail-complaints-to="abuse@iecc.com" Keywords: lex Posted-Date: 12 Mar 2018 21:50:22 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:1994 > [Doesn't that depend on whether you interpret the END STATE in state 6 to stop even > if there's more input? -John] That is why we have the "leftmost longest" rule. Try it out with any regex engine (including flex). Regards, Ben