Number ranges in edits (was Re: EDIT Quiz)

Kenneth Brody kenbrody at spamcop.net
Wed Aug 24 09:50:18 PDT 2011


On 8/23/2011 2:00 PM, Nancy Palmquist wrote:
> I am stuck.  But  I figured this would be a good quiz item and maybe
> someone can un stick my brain.
>
> I need to change this:    02051106  (4 2-digit numbers from 1 to 12)
> to this  2,5,11,6
>
> Need to drop the leading zeros and insert commas.  The field may have
> only one 2 digit number up to 4 two digit numbers.
>
> So it might be:   01  =>  1
>                               0103 = 1,3
>
> I have been doing frantic programming and I just have a block on this one.

I have already answered this one directly to Nancy, hoping others will post 
their solutions here.

On a related note, how would you write an edit for:

   Allow only two-digit numbers from "01" through "12", removing the
   leading zero, if any.

Additionally, what about:

   Allow only three-digit numbers from "165" to "433".  (Yes, those _are_
   just pulled out of the hat.  What about it?  Who says real life needs
   have to be round numbers?)

-- 
Kenneth Brody


More information about the Filepro-list mailing list