Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!.POSTED!not-for-mail From: Roedy Green Newsgroups: comp.lang.java.softwaretools Subject: Regex tools Date: Wed, 30 Mar 2011 03:27:40 -0700 Organization: Canadian Mind Products Lines: 24 Message-ID: <9516p69657r0vi887067gnu632f0hvmrbv@4ax.com> Reply-To: Roedy Green NNTP-Posting-Host: RCd/Ul4tyxGUBII8WGwa5g.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Forte Agent 6.00/32.1186 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.softwaretools:16 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