Debugging regex

R

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
http://mindprod.com
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
 
M

Martin Gregorie

Manual method as I suggested before or you can use
http://www.weitz.de/regex-coach/
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
almost equal strings 20
Browser news 4
Constellations 38
Smoothing 2
regex reserved chars 23
simple regex pattern sought 18

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top