[KLUG Members] PHP and regular expression problem

Doc Rea members@kalamazoolinux.org
30 May 2002 14:46:20 -0400


Perhaps you can find something to help here?

http://www.phpworld.com/manual/ref.array.html

On Thu, 2002-05-30 at 14:34, bob@acm.org wrote:
> >Adam Williams wrote:
> >> >It looks like the errant/missing zeros are always in the middle, why not just
> >> <much deleted>
> >> Unfortunately I don't know how many there should be.  While all the
> >> examples are gave are of a consistent length, the integer portion of the
> >> number actually varies in length.
> >
> >Simply put, it looks like the serial number contains several fields compounded
> >together.  The solution seems to lie in separating and regularizing the field you
> >want to analyze.
> >You call them integers, so maybe
> >intval($suffix)
> >and compare on the result
> >would work.
> 
> Is there a php function which will return the index order of an array that would
> place it in some sorted order? If so, this problem becomes both trivial in nature
> and has very general solution. I'm sure no one wants to go back and rework this
> thing if the meanings, intervals or other properties change. It is desirable to
> have a solution that has those properties, without getting involved in the nature
> of the data.
> 								Regards,
> 								---> RGB <---
> _______________________________________________
> Members mailing list
> Members@kalamazoolinux.org
>