ISO regex analysis and debugging tools

K

kj

I'm trying to debug some code not written by me. The problem lies
in a regular expression that is generated dynamically by the program,
and depends on user input. The bug shows up only with certain
inputs, and, unfortunately, for such inputs the problematic regex
turns out to be huge and hairy. To make matters worse, it makes
heavy use of (?{...}) constructs.

I've stared at this monster regex for a while now, but I'm getting
nowhere. I'm looking for some tools to help me analyze and debug
this thing.

For starters, a regex pretty-printer would be a huge help.

Also, anything like a regex debugger would be a godsend. Is there
such a thing?

Any other tool I should be aware of?

Thanks!

kj
 
E

ekkehard.horner

kj said:
I'm trying to debug some code not written by me. The problem lies
in a regular expression that is generated dynamically by the program,
and depends on user input. The bug shows up only with certain
inputs, and, unfortunately, for such inputs the problematic regex
turns out to be huge and hairy. To make matters worse, it makes
heavy use of (?{...}) constructs.

I've stared at this monster regex for a while now, but I'm getting
nowhere. I'm looking for some tools to help me analyze and debug
this thing.

For starters, a regex pretty-printer would be a huge help.

Also, anything like a regex debugger would be a godsend. Is there
such a thing?

Any other tool I should be aware of?

Thanks!

kj
Have a look at
http://weitz.de/regex-coach/
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top