in reply to Re^4: Converting multiple spaces to nbsp
in thread Converting multiple spaces to nbsp

I thought it was a little easier on the eyes, too. I'm surprised the look behind is faster.
  • Comment on Re^5: Converting multiple spaces to nbsp

Replies are listed 'Best First'.
Re^6: Converting multiple spaces to nbsp
by GrandFather (Saint) on Jun 17, 2005 at 07:48 UTC

    We don't know that yet, but I'll play with benchmarking it this weekend.

    My guess is that the look behind translates into a "find a space, slurp any more spaces, do the replace". My version does similar work in the search phase, but does more work in the replace phase.


    Perl is Huffman encoded by design.