in reply to Re: Substitute problem
in thread Substitute problem

Thanks to both of you!!!!

You saved me hours (and probably days) of figuring this out! It works as it should on NT and my next step is to do it on my Unix and I assume it will work there also.

The ?<!data is a reg expression that says dont match any of the data word? So I assume the ?< is a predecessor reg expression and the ! is the not part of the reg expression?

Replies are listed 'Best First'.
Re: Re: Re: Substitute problem
by BrowserUk (Patriarch) on Jul 30, 2003 at 21:35 UTC

    Right. Sort of:)

    (?<!  ) is the negative look-behind assertion construct. You put the bit that you want to trigger failure in the gap, but it must be a simple, fixed width expression. You can't use a variable width thing in there.

    See perlre. Section Extended patterns for more information. (Theres actually not much more info there. See perlretut. Section "Looking ahead and looking behind" which does.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller

      Thanks!!!