Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm wondering why my regex only matches the first half of my expression and ignores my 'or' using the following line:
if (/^ifSpeed.(\d+)|^\d+)/){ print "Index: $1\n"; }
If 'ifSpeed' is seen then the index is found but $2 is set if the second format is seen.
I'm obviously missing something here.