String Search & Replace?
Joe Chasan
joe at magnatechonline.com
Thu Nov 4 07:07:22 PST 2004
On Thu, Nov 04, 2004 at 09:19:15AM -0500, Tim Fischer wrote:
> I'm running into an issue where I need to take all the "'s out of a string
> and replace them with \". It needs to be entirely dynamic as I don't know
> where in the string the "'s will be.
>
> I've checked the xlate statement, but it looks like I can only do single
> character replacement (is this true?) which wouldn't work as I need to
> escape the quote.
>
> Obviously, I could use the mid() statement in a huge loop, but with the
> amount of fields - and the size of fields, I'd end up taking too large of a
> performance hit.
>
> Any ideas?
while i agree that the help for xlate does not specifically state you
can us it on multiple occurences of the same character or string, but
it does - in the time it took you to type your message, you could just
as easily have typed in a simple test
@wlf1::1=xlate(1,chr("34"),chr("92")); display; end
plugged in some sample data on screen and see it work.
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ---
-Joe Chasan- Magnatech Business Systems, Inc.
joe at magnatechonline.com Hicksville, NY - USA
http://www.MagnatechOnline.com Tel.(516) 931-4444/Fax.(516) 931-1264
More information about the Filepro-list
mailing list