[Chicago-talk] Removing "." from a string?
arodland at comcast.net
Fri Feb 1 15:41:54 PST 2008
On Friday 01 February 2008 05:22:45 pm Andy Lester wrote:
> On Feb 1, 2008, at 5:23 PM, Steven Lembark wrote:
> >> Other than saving one keystroke, is there anything specifically more
> >> correct or better to using tr/// there than using perl's re?
> > Less overhead: tr is iterative & table-driven,
> > regex is recursive NDA.
> All of which is undoubtedly irrelevant in this case, or 99% of any
> case unless for some reason you have a program where the bottleneck is
> the removal of periods from a string.
> In this case, Richard wants the most readable version.
Agreed, which is why I framed it as a joke in the first place. Besides, the
regex engine has been tweaked in recent versions to be competitive with tr in
terms of speed, for the jobs that they both do. :)
More information about the Chicago-talk