Your string as described ends with a colon. All you need is chop - no need for regex:
use strict; use warnings; use Test::More tests => 1; my $have = 'a:b:'; my $want = 'a:b'; chop $have; is $have, $want;
🦛
In reply to Re: Breaking symmetry with a regex
by hippo
in thread Breaking symmetry with a regex
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |