Re: delimiters with more than one character?
On Thu, Jul 16, 2020 at 11:42:10AM -0700, William Michels wrote:
> I've slowly been learning the Raku programming language (AKA Perl6), and
> while I'm far from being an expert, this is the first solution I came up
> with (raku one-or-two-liners, at the bash command prompt):
>
> user@mbook:~$ raku -e ' my Str $s=" 34 + 45 \| abc \| 1 2 3 \| c\|123abc ";
> $s.put';
> 34 + 45 | abc | 1 2 3 | c|123abc
Already you have not produced the initial input correctly. The \| is
supposed to be two characters within the actual input string. The
task is to split the input string on this MULTIPLE-character delimiter
substring, and load the results into a bash array.
Anyone can split the string on a *single* delimiter character. Even bash.
Reply to: