Changes for version 0.255 - 2025-12-12

  • Bug Fix
    • Fix a bug that the following pattern match failed.
      • Match \A - "abbcz" { my $re = Regex->new("\Aab+c"); my $target = copy "zabbcz";
        • my $offset = 1; my $match = $re->match($target, \$offset);
        • unless ($match) { return 0; }
        • unless ($offset == 5) { diag $offset; return 0; }
      • }
    • Fix a bug that the following pattern match failed.
      • Match \z - offset + length { my $re = Regex->new("\Aab+c\z"); my $target = copy "zabbcz";
        • my $offset = 1; my $length = 4; my $match = $re->match($target, \$offset, $length);
        • unless ($match) { return 0; }
        • unless ($offset == 5) { diag $offset; return 0; }
      • }
    • Fix a bug that the following replacement failed.
      • Replace offset \A { my $target = copy "zabcabcz"; my $offset = 1; my $length = 6;
        • Re->s((mutable string)$target, ["\Aabc", "g"], "ABC", \$offset);
        • unless ($target eq "zABCabcz") { diag $target; return 0; }
      • }

Modules

More Perlish Regular Expressions
Regular Expressions
Regex Matching Result
Regex Replacement Information
Callback for Regex Replacement