$ perl -Mstrict -Mwarnings -E ' use Regexp::Debugger; "abcdef" =~ / .+ (?{say "Matched so far: $&"}) bcdef $/x; '