in reply to Re: Yet Another Rosetta Code Problem (Perl, Ruby, Python, Haskell, ...)
in thread Yet Another Rosetta Code Problem (Perl, Ruby, Python, Haskell, ...)

Here's a way to "forget" the group...

#!/usr/bin/perl use strict; # https://perlmonks.org/?node_id=11137799 use warnings; $_='ZBBBCZZ'; my @list = split ' ', s/(.)\K(?!\1)/ /gr; use Data::Dump 'dd'; dd "given $_ got", \@list;

Outputs:

("given ZBBBCZZ got", ["Z", "BBB", "C", "ZZ"])

Replies are listed 'Best First'.
Re^3: Yet Another Rosetta Code Problem (Perl, Ruby, Python, Haskell, ...) (forget captures )
by LanX (Saint) on Oct 20, 2021 at 23:44 UTC

      And I see pKai is from Erlangen - an easy 216.6 km scenic drive from Darmstadt. :)

      Nice necropost BTW.

      Update: Maybe you should try to hire pKai to replace your new Python guy. :)

        I noticed.

        Actually our last "real" German Perl Workshop in 2020 ° was there and I'm wondering if I (ever) met him. :)

        (There was a time where I thought Erlang was named after Erlangen ...)

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery

        °) the only in-house/unwired Perl Workshop of 2020 AFAIK! =)

Re^3: Yet Another Rosetta Code Problem (Perl, Ruby, Python, Haskell, ...)
by LanX (Saint) on Oct 20, 2021 at 16:28 UTC
        Oh lord .... you are right!

        All praise the /r flag! :)

        And let's hope no one will ever stumble over the semipredicate whitespace you inject for splitting ;-)

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery