Either approach will use C code, which is likely many times faster for this operation.
In reply to Re: Re: Re: Fast search/replace? by chromatic in thread Fast search/replace? by weingart