[WSG] Regexp vs indexOf (followup on: Opening external links)

2005-08-02 Thread Ben Curtis
On Aug 2, 2005, at 1:45 AM, Andrew Krespanis wrote: On 8/2/05, Ben Curtis [EMAIL PROTECTED] wrote: Good catch. Now we're talking a good excuse for regular expressions. Instead of my recommendation of: a[i].getAttribute('href').toUpperCase().indexOf(HTTP://) == 0 ...I now recommend:

Re: [WSG] Regexp vs indexOf (followup on: Opening external links)

2005-08-02 Thread Thierry Koblentz
Ben Curtis wrote: But, honestly -- fractions of a millisecond. The only concerns I have for the equation are: 1- if it's unobtrusively applied, then is it bullet proof (that is, can it give a false positive a non-scriptor will have to contend with)? 2- is it easy to read, understand, and

Re: [WSG] Regexp vs indexOf (followup on: Opening external links)

2005-08-02 Thread Andrew Krespanis
Thanks for clearing that up Ben! Always glad to be told I'm wrong if I can walk away from it having learnt something ;) Cheers, Andrew. On 8/3/05, Ben Curtis [EMAIL PROTECTED] wrote: This is outdated information, apparently. I had heard the same, and was curious if things had changed since