Data::Rx::Type::PCRE - PCRE string checking for Rx (experimental)


Data-Rx-Type-PCRE documentation  | view source Contained in the Data-Rx-Type-PCRE distribution.

Index


VERSION

Top

version 0.002

SYNOPSIS

Top

  use Data::Rx;
  use Data::Rx::Type::PCRE;

  my $rx = Data::Rx->new({
    type_plugins => [ 'Data::Rx::Type::PCRE' ]
  });

  my $ph_number = $rx->make_schema({
    type  => 'tag:rjbs.manxome.org,2008-10-04:rx/pcre/str',
    regex => q/\A867-[5309]{4}\z/,
  });

DESCRIPTION

Top

This provides a new type, currently known as tag:rjbs.manxome.org,2008-10-04:rx/pcre/str, which checks strings against the Perl-compatible regular expression library. Note! This uses PCRE, not Perl's regular expressions. There are differences, but very few.

Schema definitions must have a regex parameter, which provides the regular expression as a string. They may also have a flags parameter, which provides regular expression flags to be passed to the (?i-i) style flag modifier.

AUTHOR

Top

  Ricardo SIGNES <rjbs@cpan.org>

COPYRIGHT AND LICENSE

Top

WARNING

Top

This plugin is still pretty experimental. When it's less so, it may get a new type URI. Its interface may change between now and then.


Data-Rx-Type-PCRE documentation  | view source Contained in the Data-Rx-Type-PCRE distribution.