From: Vincent Pit Date: Sat, 23 Aug 2008 09:15:38 +0000 (+0200) Subject: This is 1.02 X-Git-Tag: v1.02^0 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=288bd8baa5fee8ef1407addc316d3d331223cadd;p=perl%2Fmodules%2FRegexp-Wildcards.git This is 1.02 --- diff --git a/Changes b/Changes index 1524d4f..8c41c42 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ Revision history for Regexp-Wildcards +1.02 2008-08-23 09:15 UTC + + Add : The 'anchor' metacharacter class. + 1.01 2008-08-19 15:20 UTC + Fix : Now we can do both SQL and brackets. + Tst : Add tests for embedded newlines. diff --git a/META.yml b/META.yml index 2050f11..cfa8e61 100644 --- a/META.yml +++ b/META.yml @@ -1,6 +1,6 @@ --- #YAML:1.0 name: Regexp-Wildcards -version: 1.01 +version: 1.02 abstract: Converts wildcard expressions to Perl regular expressions. license: perl author: diff --git a/README b/README index 7d0d9b9..19cb5b7 100644 --- a/README +++ b/README @@ -3,7 +3,7 @@ NAME expressions. VERSION - Version 1.01 + Version 1.02 SYNOPSIS use Regexp::Wildcards; @@ -33,8 +33,9 @@ DESCRIPTION regular expressions, so that you can use them for matching. It handles the "*" and "?" jokers, as well as Unix bracketed - alternatives "{,}", but also "%" and "_" SQL wildcards. It can also keep - original "(...)" groups. Backspace ("\") is used as an escape character. + alternatives "{,}", but also "%" and "_" SQL wildcards. If required, it + can also keep original "(...)" groups or "^" and "$" anchors. Backspace + ("\") is used as an escape character. Typesets that mimic the behaviour of Windows and Unix shells are also provided. @@ -54,8 +55,8 @@ METHODS more details. "do [ $what | set => $c1, add => $c2, rem => $c3 ]" - Specifies the list of metacharacters to convert. They are classified - into five classes : + Specifies the list of metacharacters to convert or to prevent for + escaping. They fit into six classes : * 'jokers' converts "?" to "." and "*" to ".*" ; @@ -86,6 +87,12 @@ METHODS 'a(b(c))d\\(\\)' ==> (no change) + * 'anchors' prevents the *beginning-of-line* "^" and *end-of-line* "$" + anchors to be escaped. Since "[...]" character class are currently + escaped, a "^" will always be interpreted as *beginning-of-line*. + + 'a^b$c' ==> (no change) + Each $c can be any of : * A hash reference, with wanted metacharacter group names (described diff --git a/lib/Regexp/Wildcards.pm b/lib/Regexp/Wildcards.pm index f4be72f..0394e9a 100644 --- a/lib/Regexp/Wildcards.pm +++ b/lib/Regexp/Wildcards.pm @@ -12,13 +12,13 @@ Regexp::Wildcards - Converts wildcard expressions to Perl regular expressions. =head1 VERSION -Version 1.01 +Version 1.02 =cut use vars qw/$VERSION/; BEGIN { - $VERSION = '1.01'; + $VERSION = '1.02'; } =head1 SYNOPSIS @@ -243,7 +243,7 @@ C<'groups'> keeps the parenthesis C<( ... )> of the original string without esca =item * -C<'anchors'> prevents the beginning-of-line C<^> and end-of-line C<$> anchors to be escaped. Since C<[...]> character class are currently escaped, a C<^> will always be interpreted as such. +C<'anchors'> prevents the I C<^> and I C<$> anchors to be escaped. Since C<[...]> character class are currently escaped, a C<^> will always be interpreted as I. 'a^b$c' ==> (no change)