Created
July 28, 2010 11:31
-
-
Save tom-lpsd/494146 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use Data::Dump qw(dump); | |
use Regexp::Assemble; | |
my $regexp1 = Regexp::Assemble->new; | |
$regexp1->track; | |
$regexp1->add('foo.*'); | |
$regexp1->add('bar.*'); | |
dump($regexp1->match('foobarbaz')); # prints "foo.*" | |
my $regexp2 = Regexp::Assemble->new; | |
$regexp2->track; | |
$regexp2->add('foo.*'); | |
$regexp2->add('bar.*'); | |
dump($regexp2->match('foobarbaz')); # prints "1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment