Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #224886 > unrolled thread

Re: delimiters with more than one character?

Started byGreg Wooledge <wooledg@eeg.ccf.org>
First post2020-07-16 21:10 +0200
Last post2020-07-16 21:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.debian.user

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: delimiters with more than one character? Greg Wooledge <wooledg@eeg.ccf.org> - 2020-07-16 21:10 +0200

#224886 — Re: delimiters with more than one character?

FromGreg Wooledge <wooledg@eeg.ccf.org>
Date2020-07-16 21:10 +0200
SubjectRe: delimiters with more than one character?
Message-ID<Athqx-2eq-7@gated-at.bofh.it>
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.

[toc] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web