9fans archive / 2001 / 03 / 262 /    prev next

From: rog@vit...
Subject: Re: [9fans] more questions
Date: Wed, 28 Mar 2001 11:21:08 0100

i've been bitten by that regexp problem before.  your problem is that
the matches array is being used uninitialised.  as the documentation
says:

          If match[0].sp is nonzero on entry, regexec starts matching
          at that point within string. If match[0].ep is nonzero on
          entry, the last character matched is the one preceding that
          point.

in a larger program, your code would probably have broken... and then
you'd probably have found the problem!

  cheers,
    rog.