in reply to Re: My regex is too greedy!
in thread My regex is too greedy!

Would this be a more efficient regex without the .+? at the beginning? You aren't, after all, capturing it...

Replies are listed 'Best First'.
Re: Re: Re: My regex is too greedy!
by blokhead (Monsignor) on Mar 05, 2003 at 18:07 UTC
    If we're doing just a m// match then you are certainly right. I was using s///, so I needed to match the whole string to replace it.

    blokhead

      Gah. Sorry, I missed that you were still looking at the s///. For some reason I was thinking you had switched it to a m//.