in reply to Re: Applying a regex to part of a string
in thread Applying a regex to part of a string

That's already what I am doing in my first method. I was using a variable to make the example code look better. I should have mentioned that in real world cases I apply "substr" to the original string on the fly.

Thanks anyway.

  • Comment on Re^2: Applying a regex to part of a string

Replies are listed 'Best First'.
Re^3: Applying a regex to part of a string
by Roger (Parson) on Aug 18, 2005 at 23:24 UTC
    Your substr is missing the +1 bit. It would only match between character positions 11 and 29, not 30.

      That's right. I missed that point. Fixed now.

      Thanks again.