Debugging regex


Roedy Green

Is there any way when a regex fails to find out the offset of how far
into the pattern max it was able to match?

This would be a great help in figuring out why regexes fail to match.
Roedy Green Canadian Mind Products
PM Steven Harper is fixated on the costs of implementing Kyoto, estimated as high as 1% of GDP.
However, he refuses to consider the costs of not implementing Kyoto which the
famous economist Nicholas Stern estimated at 5 to 20% of GDP





Martin Gregorie

Manual method as I suggested before or you can use
It looks useful, though as it is designed to debug Perl regexes, there's
a good case for knocking up a Java equivalent. I haven't needed any
complex Java regexes yet, or I'd have done just that. I'd probably write
a command line tool, like grep, rather than bothering with a GUI, because
(a) thats better for trying a regex against a number of test cases in one
run and (b) I can avoid designing and implementing a graphical interface.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

case sensitive filenames 62
Regex Puzzle 5
Browser news 4
almost equal strings 20
Smoothing 2
Constellations 38
negative regexes. 10
Regex ^ beginning not strong? 2