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.
expressions.
VERSION
- Version 1.01
+ Version 1.02
SYNOPSIS
use Regexp::Wildcards;
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.
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 ".*" ;
'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
=head1 VERSION
-Version 1.01
+Version 1.02
=cut
use vars qw/$VERSION/;
BEGIN {
- $VERSION = '1.01';
+ $VERSION = '1.02';
}
=head1 SYNOPSIS
=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<beginning-of-line> C<^> and I<end-of-line> C<$> anchors to be escaped. Since C<[...]> character class are currently escaped, a C<^> will always be interpreted as I<beginning-of-line>.
'a^b$c' ==> (no change)