Finding the intersection between two regexes

David Cantrell david at
Fri Apr 25 00:47:04 BST 2014

On 24/04/2014 23:28, Mark Fowler wrote:
> On Thursday, April 24, 2014, Michael Lush <mjlush at> 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.

My regexes come directly from Google's libphonenumber. They are happy to 
accept patches provided you sign your life away in blood. I require no 
such blood sacrifice for my code, but do insist that the tests still 
pass on perl 5.8.8.

Assuming that you actually care, and aren't just pedanting in the finest 
custom of this august group, of course :-)

David Cantrell | top google result for "internet beard fetish club"

          Nuke a disabled unborn gay baby whale for JESUS!

More information about the mailing list