Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #1990
| Path | csiph.com!xmission!news.snarked.org!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end |
|---|---|
| From | Ben Hanson <jamin.hanson@googlemail.com> |
| Newsgroups | comp.compilers |
| Subject | Re: Regular expression string searching & matching |
| Date | Sun, 11 Mar 2018 13:52:53 -0700 (PDT) |
| Organization | Compilers Central |
| Lines | 47 |
| Sender | news@iecc.com |
| Approved | comp.compilers@iecc.com |
| Message-ID | <18-03-041@comp.compilers> (permalink) |
| References | <18-03-016@comp.compilers> <18-03-032@comp.compilers> <18-03-034@comp.compilers> <18-03-035@comp.compilers> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="UTF-8" |
| Injection-Date | Sun, 11 Mar 2018 20:52:53 +0000 |
| Injection-Info | gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="46062"; mail-complaints-to="abuse@iecc.com" |
| Keywords | lex, comment |
| Posted-Date | 12 Mar 2018 16:19:27 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:1990 |
Show key headers only | View raw
> /This/ actually worked for me (one character change): > > [/][*]([^*]|[*]+[^/])*[*]+[/] Your modified regex produces the following state machine: State: 0 [/] -> 1 State: 1 [*] -> 2 State: 2 [^*] -> 2 [*] -> 3 State: 3 [^*/] -> 2 [*] -> 4 [/] -> 5 State: 4 [^*/] -> 2 [*] -> 4 [/] -> 6 State: 5 END STATE State: 6 END STATE [^*] -> 2 [*] -> 3 Which will match /***/a*/ in its entirety, when if should only match /***/ Regards, Ben [Doesn't that depend on whether you interpret the END STATE in state 6 to stop even if there's more input? -John]
Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar
Regular expression string searching & matching Clint O <clint.olsen@gmail.com> - 2018-03-04 01:37 -0800
Re: Regular expression string searching & matching Ben Hanson <jamin.hanson@googlemail.com> - 2018-03-07 11:53 -0800
Re: Regular expression string searching & matching Ben Hanson <jamin.hanson@googlemail.com> - 2018-03-07 12:18 -0800
Re: Regular expression string searching & matching Clint O <clint.olsen@gmail.com> - 2018-03-08 22:53 -0800
Re: Regular expression string searching & matching Clint O <clint.olsen@gmail.com> - 2018-03-10 00:57 -0800
Re: Regular expression string searching & matching Ben Hanson <jamin.hanson@googlemail.com> - 2018-03-11 13:52 -0700
Re: Regular expression string searching & matching Clint O <clint.olsen@gmail.com> - 2018-03-12 14:00 -0700
Re: Regular expression string searching & matching Ben Hanson <jamin.hanson@googlemail.com> - 2018-03-13 11:30 -0700
Re: Regular expression string searching & matching Clint O <clint.olsen@gmail.com> - 2018-03-17 16:52 -0700
Re: Regular expression string searching & matching Clint O <clint.olsen@gmail.com> - 2018-03-18 19:23 +0000
Re: Regular expression string searching & matching Clint O <clint.olsen@gmail.com> - 2018-03-20 17:23 +0000
Re: Regular expression string searching & matching Clint O <clint.olsen@gmail.com> - 2018-03-22 17:46 +0000
Re: Regular expression string searching & matching Ben Hanson <jamin.hanson@googlemail.com> - 2018-03-12 15:46 -0700
Re: Regular expression string searching & matching Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2018-03-13 10:53 +0100
Re: Regular expression string searching & matching Ben Hanson <jamin.hanson@googlemail.com> - 2018-03-13 14:23 -0700
Re: Regular expression string searching & matching Ben Hanson <jamin.hanson@googlemail.com> - 2018-03-10 03:17 -0800
csiph-web