[KLUG Members] PHP and regular expression problem

bill members@kalamazoolinux.org
Thu, 30 May 2002 14:18:39 -0400


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.

kind regards,

bill