ISO regex analysis and debugging tools

Discussion in 'Perl Misc' started by kj, Nov 16, 2005.

  1. kj

    kj Guest

    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
    --
    NOTE: In my address everything before the first period is backwards;
    and the last period, and everything after it, should be discarded.
     
    kj, Nov 16, 2005
    #1
    1. Advertising

  2. kj

    Paul Lalli Guest

    kj wrote:

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


    use re 'debug';

    Paul Lalli
     
    Paul Lalli, Nov 16, 2005
    #2
    1. Advertising

  3. kj wrote:

    > 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/
     
    ekkehard.horner, Nov 16, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Franck DARRAS
    Replies:
    12
    Views:
    641
    Jim Higson
    Aug 23, 2004
  2. Alexei Polkhanov
    Replies:
    11
    Views:
    2,464
  3. Replies:
    13
    Views:
    6,431
    Dave Thompson
    Dec 20, 2004
  4. ISO C89 and ISO C99

    , Dec 10, 2004, in forum: C Programming
    Replies:
    18
    Views:
    545
    Dave Thompson
    Dec 20, 2004
  5. ssubbarayan
    Replies:
    5
    Views:
    2,336
    Dave Hansen
    Nov 3, 2009
Loading...

Share This Page