From: <per...@li...> - 2006-02-24 18:42:13
|
Update of /cvsroot/perl-flat/blokhead/lib/FLAT/Regex In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27297/lib/FLAT/Regex Modified Files: Op.pm Log Message: - updates to regex ops (especially handling extended [] characters) - added more regex tests - anchoring option to as_perl_regex - "contains" method for regexes (just pass off regex matching to perl ;)) Index: Op.pm =================================================================== RCS file: /cvsroot/perl-flat/blokhead/lib/FLAT/Regex/Op.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Op.pm 24 Feb 2006 06:20:26 -0000 1.4 --- Op.pm 24 Feb 2006 18:42:09 -0000 1.5 *************** *** 26,30 **** return "#" if not defined $t; ! return 1 == length $t ? $t : "[$t]"; --- 26,30 ---- return "#" if not defined $t; ! return $t =~ /^\w$/ ? $t : "[$t]"; *************** *** 37,41 **** $r = quotemeta $r; ! return length $r == 1 ? $r : "(?:$r)"; } --- 37,41 ---- $r = quotemeta $r; ! return $r =~ /^\w$/ ? $r : "(?:$r)"; } |