String::BlackWhiteList

String::BlackWhiteList is a Perl module to match a string against a blacklist and a whitelist.
Download

String::BlackWhiteList Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Marcel Grnauer
  • Publisher web site:
  • http://search.cpan.org/~marcel/Module-Install-Template-0.05/lib/Module/Install/Template.pm

String::BlackWhiteList Tags


String::BlackWhiteList Description

String::BlackWhiteList is a Perl module to match a string against a blacklist and a whitelist. String::BlackWhiteList is a Perl module to match a string against a blacklist and a whitelist.SYNOPSIS use String::BlackWhiteList; use constant BLACKLIST => ( 'POST', 'PO', 'P O', 'P O BOX', 'P.O.', 'P.O.B.', 'P.O.BOX', 'P.O. BOX', 'P. O.', 'P. O.BOX', 'P. O. BOX', 'POBOX', ); use constant WHITELIST => ( 'Post Road', 'Post Rd', 'Post Street', 'Post St', 'Post Avenue', 'Post Av', 'Post Alley', 'Post Drive', ); my @ok = ( 'Post Road 123', 'Post Rd 123', 'Post Street 123', 'Post St 123', 'Post Avenue 123', ); my @not_ok = ( 'Post', 'P.O. BOX 37', 'P.O. BOX 37, Post Drive 9', 'Post Street, P.O.B.', ); plan tests => @ok + @not_ok; my $matcher = String::BlackWhiteList->new( blacklist => , whitelist => )->update; ok( $matcher->valid($_), " valid") for @ok; ok(!$matcher->valid($_), " invalid") for @not_ok;Requirements:· Perl Requirements: · Perl


String::BlackWhiteList Related Software