Path: csiph.com!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Ben Hanson Newsgroups: comp.compilers Subject: Re: Regular expression string searching & matching Date: Tue, 13 Mar 2018 14:23:40 -0700 (PDT) Organization: Compilers Central Lines: 22 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <18-03-059@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> <18-03-050@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="81279"; mail-complaints-to="abuse@iecc.com" Keywords: lex, DFA Posted-Date: 13 Mar 2018 17:32:45 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:2003 On Tuesday, 13 March 2018 19:33:53 UTC, Hans-Peter Diettrich wrote: > > State: 0 > > [/] -> 1 > > > > State: 1 > > [*] -> 2 > > > > State: 2 > > [^*] -> 2 > > [*] -> 3 > > I'm just curious about the notation. > What happens if neither pattern matches? > What's the purpose of [^*] in state 2, as opposed to state 1? In state 2 you are either looping on [^*] (anything other than '*') or changing state to state 3 on '*'. I'm not sure I understand your question. Regards, Ben