X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FRegexp%2FWildcards.pm;h=581aa36f2ad56bd9d96f05d54e697b83b55d33f6;hb=4ce36c10bb682fb575addd550bd8efe104061e00;hp=b65eebe021ea48d90c8ffe45b6bafddc2d50a9a0;hpb=510bd793e8fac0683f0ac86adbfd48b5af7b14b9;p=perl%2Fmodules%2FRegexp-Wildcards.git diff --git a/lib/Regexp/Wildcards.pm b/lib/Regexp/Wildcards.pm index b65eebe..581aa36 100644 --- a/lib/Regexp/Wildcards.pm +++ b/lib/Regexp/Wildcards.pm @@ -13,13 +13,13 @@ Regexp::Wildcards - Converts wildcard expressions to Perl regular expressions. =head1 VERSION -Version 1.04 +Version 1.05 =cut use vars qw<$VERSION>; BEGIN { - $VERSION = '1.04'; + $VERSION = '1.05'; } =head1 SYNOPSIS @@ -31,8 +31,10 @@ BEGIN { my $re; $re = $rw->convert('a{b?,c}*'); # Do it Unix shell style. $re = $rw->convert('a?,b*', 'win32'); # Do it Windows shell style. - $re = $rw->convert('*{x,y}?', 'jokers'); # Process the jokers and escape the rest. - $re = $rw->convert('%a_c%', 'sql'); # Turn SQL wildcards into regexps. + $re = $rw->convert('*{x,y}?', 'jokers'); # Process the jokers and + # escape the rest. + $re = $rw->convert('%a_c%', 'sql'); # Turn SQL wildcards into + # regexps. $rw = Regexp::Wildcards->new( do => [ qw ], # Do jokers and brackets. @@ -40,7 +42,8 @@ BEGIN { ); $rw->do(add => 'groups'); # Don't escape groups. - $rw->capture(rem => [ qw ]); # Actually we want non-greedy matches. + $rw->capture(rem => [ qw ]); # Actually we want non-greedy + # matches. $re = $rw->convert('*a{,(b)?}?c*'); # '(.*?)a(?:|(b).).c(.*?)' $rw->capture(); # No more captures. @@ -336,7 +339,8 @@ No argument means C<< set => [ ] >>. $rw->do(set => 'jokers'); # Only translate jokers. $rw->do('jokers'); # Same. $rw->do(add => [ qw ]); # Translate also SQL and commas. - $rw->do(rem => 'jokers'); # Specifying both 'sql' and 'jokers' is useless. + $rw->do(rem => 'jokers'); # Specifying both 'sql' and + # 'jokers' is useless. $rw->do(); # Translate nothing. The C method returns the L object. @@ -445,9 +449,11 @@ Capture matching C<{ ... , ... }> alternations. =back - $rw->capture(set => 'single'); # Only capture "exactly one" metacharacters. + $rw->capture(set => 'single'); # Only capture "exactly one" + # metacharacters. $rw->capture('single'); # Same. - $rw->capture(add => [ qw ]); # Also greedily capture "any" metacharacters. + $rw->capture(add => [ qw ]); # Also greedily capture + # "any" metacharacters. $rw->capture(rem => 'greedy'); # No more greed please. $rw->capture(); # Capture nothing. @@ -523,7 +529,8 @@ You can contact me by mail or on C (vincent). =head1 BUGS -Please report any bugs or feature requests to C, or through the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. +Please report any bugs or feature requests to C, or through the web interface at L. +I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. =head1 SUPPORT @@ -535,7 +542,7 @@ Tests code coverage report is available at L