The federal government should fine IBM out the ass for a patent application this ridiculously obvious. It's just a waste of the US Patent Office's limited resources to even use the application for bird cage liner. Here, I'll infringe it:
use strict;
my $ssn1 = '123456789';
my $ssn2 = '123-45-6789';
if ($ssn1 =~ /[\d]{9}/ or
$ssn1 =~ /[\d]{3}-[\d]{2}-[\d]{4}/)
{
print "SSN1 is Valid.\n";
}
if ($ssn2 =~ /[\d]{9}/ or
$ssn2 =~ /[\d]{3}-[\d]{2}-[\d]{4}/)
{
print "SSN2 is Valid.\n";
}
As I said, it's ridiculous. Took me no time to "infringe on their intellectual property." If this passes, it'll just be used as a cudgel for IBM to beat up a smaller rival who will have to waste valuable capital proving that any programmer with a half page cheat sheet on regular expressions could violate IBM's "right" to this "innovation" in under a few minutes even if they'd never seen a regex before.
Leave a comment