in reply to Regex question

It's not clear what the OP means by "1st 2 digits":

1. 1st 2 chars
if( substr($v1, 0, 2) eq substr($v2, 0, 2) )
2. 1st 3 chars where 2nd char is '.'
if( (substr($v1, 0, 3) eq substr($v2, 0, 3) ) && substr($v1, 1 ,1) eq '.' && substr($v2, 1 ,1) eq '.' )
3. 1st 3 chars where 2nd char is anything
if( substr($v1, 0, 3) eq substr($v2, 0, 3) )
Cheers
Chris