[ic] eBay UserTags Update

Grant emailgrant123b at yahoo.com
Tue Mar 23 21:16:03 EST 2004


--- Kevin Walsh <kevin at cursor.biz> wrote:
> Grant [emailgrant123b at yahoo.com] wrote:
> > I did get some more info from the Perl group I got
> the
> > modified code from.  Apparently "Regexes are not
> the
> > Right Tool for constant strings" so I'm replacing:
> > 
> > if ($response =~ /^<\?xml/ ) {
> > 
> > with:
> > 
> > if ( index($response, '<?xml') == 0 ) {
> > 
> > in all the tags.  I'll be sure to let everyone
> know if this causes
> > problems. 
> > 
> It won't cause problems, but it may affect code
> readability.
> 
> The index() will probably be twice as fast as that
> regex, in that
> particular case, but considering the fact that the
> regex will probably
> take 0.0000008 seconds to execute, being twice as
> fast isn't really
> something to get excited about. :-)

I see.  It does seem like it would be easier to
visually parse the other one.

- Grant

__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html


More information about the interchange-users mailing list