develooper Front page | perl.perl6.users | Postings from July 2020

Fwd: delimiters with more than one character? ...

Thread Next
From:
Tom Browder
Date:
July 16, 2020 12:35
Subject:
Fwd: delimiters with more than one character? ...
Message ID:
CAFMGiz9Xm8JP4AO5r3cz_-=b+Y=QvYc7i2vDtgsR=SS6rEhc8w@mail.gmail.com
An opportunity for Raku golfers to show off Raku on the Debian users list.

Best regards,

-Tom

---------- Forwarded message ---------
From: Albretch Mueller <lbrtchx@gmail.com>
Date: Tue, Jul 14, 2020 at 07:52
Subject: delimiters with more than one character? ...
To: Debian Users ML <debian-user@lists.debian.org>


 I have a string delimited by two characters: "\|"

 _S=" 34 + 45 \| abc \| 1 2 3 \| c\|123abc "

 which then I need to turn into a array looking like:

  _S_AR=(
" 34 + 45 "
" abc "
" 1 2 3 "
" c"
"123abc "
)

  I can't make awk or tr work in the way I need and all examples I
have found use only one character.

  Is it possible to do such things in bash?

  lbrtchx

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