On Thursday, April 24, 2014, Michael Lush <mjlush at gmail.com> wrote: if ($x =~ /^246[2-9]\d{6}$/ and $x =~ > /^246(?:(?:2[346]|45|82)\d|25[0-4])\d{4}$/ ) Those /d are incorrect. You want [0-9] or to use the /a regexp flag on a suitably modern perl. Mark