in reply to Re: RegEx - match pattern not followed by literal
in thread RegEx - match pattern not followed by literal

Well, it wasn't really a question about optimisation (in terms of speed) - more about 'neatness'.

That said, good point about testing for ,v prior to the user's regex.

Hey! Did you down-vote me? Wah! This means war...

Tom Melly, tom@tomandlu.co.uk
  • Comment on Re^2: RegEx - match pattern not followed by literal

Replies are listed 'Best First'.
Re^3: RegEx - match pattern not followed by literal
by Fletch (Bishop) on Oct 12, 2006 at 16:30 UTC

    I downvote everyone. Even myself.

Re^3: RegEx - match pattern not followed by literal
by blazar (Canon) on Oct 12, 2006 at 18:01 UTC
    Well, it wasn't really a question about optimisation (in terms of speed) - more about 'neatness'.

    Neatness is in the eye of the beholder. General rule is: if it fits naturally in two separate matches then chances are that indeed it may be done in one, but at the expense of neatness, and vice versa. I say so because it happens all the time to read about people who "want to do it in just one match" since they think it's neater. Most times it plainly won't be.