I don't use ereg(i)? much myself but for a perl compat regex I would:
/^(([0-9a-z](\2*))\.([0-9a-z](\2*)))/i
the \# refer to parenthized matches starting at 1 and counting left parens. 
The match array index you will want is $myArray[1].
if you don't mind matching
1a2.1a2 you can use
/^(([0-9a-z]+)\.\1+)/i

or
123.456
/^([0-9a-z]+\.[0-9a-z]+)/i

morgan



>""Jason Caldwell"" <[EMAIL PROTECTED]> wrote in message
>9boi65$ipb$[EMAIL PROTECTED]">news:9boi65$ipb$[EMAIL PROTECTED]...
> > I'm looking to compare if my array values match any digits or alpha
> > characters with a dot between them... so, if I think I understand Regular
> > Expressions (from what I could gather from PHP.net and Core PHP
>Programming
> > by Leon Atkinson.)
> >
> > I want to match any of the following:
> >
> > 1.1 or a.a
> >
> > or 1111.1111 or aaaa.aaaa    <-- any number of digits (0-9) or alpha (a-z)
> > on either side of the dot.
> >
> > if(eregi("^([0-9][a-z]\.[0-9][a-z]", $myArray[x]))
> >
> > Is this correct?  I think I'm missing something.
> >
> > Thanks.
> > Jason

Reply via email to