Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.softwaretools > #16

Regex tools

From Roedy Green <see_website@mindprod.com.invalid>
Newsgroups comp.lang.java.softwaretools
Subject Regex tools
Date 2011-03-30 03:27 -0700
Organization Canadian Mind Products
Message-ID <9516p69657r0vi887067gnu632f0hvmrbv@4ax.com> (permalink)

Show all headers | View raw


has anyone ever thought of writing a regex debugging frame.

You would give it lists of lines that should match and lists of lines
that should not.

It then shows you the furthest offset in the regex it managed to match
to for each line, and verifies lines that should match matched (and
the group(i), and that lines that did not match did not.

Once you have mastered that, consider writing a automatic regex
composer.  Just from the examples it composes a regex.  You then add
more examples to test the regex, or modify it by hand. Perhaps it even
generates more examples to clarify your intentions.  You iterate till
you have a working regex.

The thing that bothers me is I am never sure a regex is fully
debugged.

-- 
Roedy Green Canadian Mind Products
http://mindprod.com
There are only two industries that refer to their customers as "users".
~ Edward Tufte

Back to comp.lang.java.softwaretools | NextNext in thread | Find similar | Unroll thread


Thread

Regex tools Roedy Green <see_website@mindprod.com.invalid> - 2011-03-30 03:27 -0700
  Re: Regex tools David Lamb <dalamb@cs.queensu.ca> - 2011-03-30 16:31 -0400
  Re: Regex tools terry0k <terryok00@gmail.com> - 2011-05-12 21:01 +0800
  Re: Regex tools Robert Klemme <shortcutter@googlemail.com> - 2011-05-27 21:38 +0200

csiph-web