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 | |
by eyepopslikeamosquito (Archbishop) on Oct 21, 2021 at 01:01 UTC | |
by LanX (Saint) on Oct 21, 2021 at 04:09 UTC | |
Re^3: Yet Another Rosetta Code Problem (Perl, Ruby, Python, Haskell, ...)
by LanX (Saint) on Oct 20, 2021 at 16:28 UTC | |
by tybalt89 (Monsignor) on Oct 20, 2021 at 17:27 UTC | |
by LanX (Saint) on Oct 20, 2021 at 17:40 UTC | |
by Tux (Canon) on Oct 21, 2021 at 08:51 UTC |