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<jokers brackets> ], # Do jokers and brackets.
);
$rw->do(add => 'groups'); # Don't escape groups.
- $rw->capture(rem => [ qw<greedy> ]); # Actually we want non-greedy matches.
+ $rw->capture(rem => [ qw<greedy> ]); # Actually we want non-greedy
+ # matches.
$re = $rw->convert('*a{,(b)?}?c*'); # '(.*?)a(?:|(b).).c(.*?)'
$rw->capture(); # No more captures.
$rw->do(set => 'jokers'); # Only translate jokers.
$rw->do('jokers'); # Same.
$rw->do(add => [ qw<sql commas> ]); # 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<do> method returns the L<Regexp::Wildcards> object.
=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<any greedy> ]); # Also greedily capture "any" metacharacters.
+ $rw->capture(add => [ qw<any greedy> ]); # Also greedily capture
+ # "any" metacharacters.
$rw->capture(rem => 'greedy'); # No more greed please.
$rw->capture(); # Capture nothing.
=head1 BUGS
-Please report any bugs or feature requests to C<bug-regexp-wildcards at rt.cpan.org>, or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Regexp-Wildcards>. 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<bug-regexp-wildcards at rt.cpan.org>, or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Regexp-Wildcards>.
+I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
=head1 SUPPORT
=head1 COPYRIGHT & LICENSE
-Copyright 2007-2009 Vincent Pit, all rights reserved.
+Copyright 2007,2008,2009,2013 Vincent Pit, all rights reserved.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.