edits help
Kenneth Brody
kenbrody at spamcop.net
Fri May 27 12:41:33 PDT 2011
On 5/26/2011 11:07 PM, Jeff Harrison wrote:
[...]
>>>> { @ | (!"'"!<&39;>) | * }
[...]
>> Pop quiz time. I hope everyone has been keeping good notes...
>>
>> Why does the above edit fail on fields with an apostrophe, if the "@" part
>> is left off?
>
> Good question. I never understood this - that is probably why I can't remember
> to use the @. Is it because filepro is examining the original string before any
> replacement took place? The end resulting string is larger but filepro needs to
> know that when it comes to the end of the original string that it is ok to
> continue?
Well, it was hinted at by someone elsethread. You're on the right track,
however.
Since no one else has chimed in...
Without it, the "accept any amount of any character" part of the edit will
accept all of the trailing spaces. Because the "&39;" expansion has
increased the number characters in the field, the result no longer fits. By
adding the "@" (which must come before the "*"), all of the trailing spaces
are consumed, and are not part of the resulting value. Therefore, unless
the expanded value is too long to fit, the edit "works". (Consider the case
of a field consisting of nothing but apostrophes.) However, using DOEDIT()
and passing an explicit length, can work around this.
--
Kenneth Brody
More information about the Filepro-list
mailing list