From a48cb77aac544bc09673abdabd65dd0e0ef6e1bf Mon Sep 17 00:00:00 2001 From: Brett Pynn Date: Wed, 30 Sep 2026 23:08:49 -0700 Subject: [PATCH] Strip leading zeroes while preserving a real numeric zero (for example, S00 specials). (#160) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I always forget the regex syntax, so I can't really review the changes, but if it works… --- Utilities/ParseFilename/lib/Video/Filename.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utilities/ParseFilename/lib/Video/Filename.pm b/Utilities/ParseFilename/lib/Video/Filename.pm index b9cc481..4350052 100755 --- a/Utilities/ParseFilename/lib/Video/Filename.pm +++ b/Utilities/ParseFilename/lib/Video/Filename.pm @@ -337,7 +337,7 @@ sub new { # Cosmetics for my $key (qw(dvd season episode endep part)) { - $self->{$key} =~ s/^0+// if defined $self->{$key}; + $self->{$key} =~ s/^0+(?=\d)// if defined $self->{$key}; } $self->{endep} = undef if $self->{endep} == $self->{episode};