is there a way

Kenneth Brody kenbrody at bestweb.net
Fri Jan 11 11:32:31 PST 2008


Quoting Richard Kreiss (Fri, 11 Jan 2008 14:09:24 -0500):

> A client gets csv files with the name format xxxxx_clean.csv.
>
> Xxxxx can be from 2 or more letters long.  I would love to use xlate(fn,_
> clean,"").  But this would remove all instances of those letters.
>
> Short of hashing the field holding this name until getting to _ and then
> using file_name=mid(fn,"1","ct-"1") to get just the name portion, is there
> an easier way?

You don't say what you ware trying to do, but from context I am assuming
that you want to eliminate the string "_clean" from the value?

You could use INSTR() to find any occurrence of "_clean" and then use
MID() to pull the field apart.

You could also use an edit.

I'll leave the MID() version as an exercise for the reader.  However, the
edit could be:

     { !"_clean"! | * }

-- 
KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com


More information about the Filepro-list mailing list