develooper Front page | perl.perl6.users | Postings from August 2021

Re: pairs of separators from a string

Thread Previous | Thread Next
From:
Marc Chantreux
Date:
August 22, 2021 13:25
Subject:
Re: pairs of separators from a string
Message ID:
YSJQDOpn1LfOK/4o@prometheus.u-strasbg.fr
hello William,

> your string, or whether-or-not some might be nested within each other. You
> show a lone ampersand ("&") at the beginning of your example, but other
> strings may not be so simple.

really sorry about this artefact from previous attempts :(

> > $string.comb(/ ( <:Ps> ~ <:Pe> .?) /, :global).raku.say
> ("()", "\{}", "[]").Seq

those regexes i can't read for the moment is a good excuse to learn more
about raku. i'll read them later and come back here if i have questions.

thanks and regards.
marc

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About