in reply to Re^2: Replace all characters inbetween
in thread Replace all characters inbetween

$s =~s{A\K([^A]+)(?=A)} {"A" x length $1 };

s{A\K([^A]+)(?=A)} {"A" x length $1 } is missing the /eg modifiers. See s/// (https://perldoc.perl.org/perlop#s/PATTERN/REPLACEMENT/msixpodualngcer) in perlop.


Give a man a fish:  <%-{-{-{-<