Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #28232
| From | Gene Wirchenko <genew@telus.net> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Debugging regexes |
| Date | 2014-04-25 10:09 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <qg5ll9h57ej5csm37vsbig68da9abu6jca@4ax.com> (permalink) |
| References | <kd1il9po8nstd06tt2pqfe741hg48885r7@4ax.com> |
On Thu, 24 Apr 2014 05:39:38 -0700, Roedy Green
<see_website@mindprod.com.invalid> wrote:
>Regexes are black box. If they fail, you have no idea where.
True. For that reason, I often use a finite state automaton. A
regex either succeeds or fails. I prefer to pick up more information.
When I use regexes, I keep them simple, because debugging one can
be a real bear. I will use short regexes with glue code rather than
one monster.
>It would be nice if Matcher had some debugging methods to tell you the
>offset and length of the best/longest match it was able to make, even
>if it did not completely match.
I wish that there were not so many varieties regex languages.
Sincerely,
Gene Wirchenko
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Debugging regexes Roedy Green <see_website@mindprod.com.invalid> - 2014-04-24 05:39 -0700
Re: Debugging regexes leif.roar@invalid.com (Leif Roar Moldskred) - 2014-04-24 09:38 -0500
Re: Debugging regexes Roedy Green <see_website@mindprod.com.invalid> - 2014-04-24 20:21 -0700
Re: Debugging regexes markspace <markspace@nospam.nospam> - 2014-04-25 00:17 -0700
Re: Debugging regexes Roedy Green <see_website@mindprod.com.invalid> - 2014-04-25 01:05 -0700
Re: Debugging regexes Gene Wirchenko <genew@telus.net> - 2014-04-25 10:09 -0700
Re: Debugging regexes Roedy Green <see_website@mindprod.com.invalid> - 2014-05-05 23:19 -0700
csiph-web