bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: repost of alike 'missing a way to extract data'


From: Alex fxmbsw7 Ratchev
Subject: Re: repost of alike 'missing a way to extract data'
Date: Thu, 18 Mar 2021 15:57:31 +0100

what, dude, of course you can regex eerything right
that is, for no quotes
till non escaped end, ] probably
for " its till nonescaped "
and for $' till nonescaped '

i can regex it or extglob it
hm ?
but i need the results of grouping of the matches ( '( .. )' )

On Thu, Mar 18, 2021 at 3:39 PM Greg Wooledge <greg@wooledge.org> wrote:

> On Thu, Mar 18, 2021 at 02:44:06PM +0100, Alex fxmbsw7 Ratchev wrote:
> > isnt it obvious ..
>
> No.
>
> > ${var//@(abc|cde)@(bla|blubb)/\2\1} # just like sed
> > and an extension for regex there
>
> That's a feature request.  Chet can discuss that with you.
>
> All I can tell you is that this feature is not in any way suitable for
> retrieving an element from an associative array.  If it actually existed,
> which of course it doesn't.
>
> > as for example, i can give you my garbage data
> >
> > begin='declare -A a' end='declare -p a' per2 'a[$per]=' *
> > declare -A a=(["\\\\"]="" ["] \$( eval echo shitt )"]="" [$'abc
> > \034[22]="bar"']="" [$'\034']="" [$'\n']="" [2]="" ["]"]="" [" a   b"]=""
> > ["' [b"]="" ["\" ["]="" [$'\' [1]=\034']="" ["];eval echo shitt"]=""
> > [$'foo\034 [2]="blah" ']="" [abc]="" ["abc [22]=\"bar\""]="" [blah]="" )
>
> I cannot make ANY sense of this.  I don't know what you're doing or why.
>
> Whatever you're doing, it's ridiculously convoluted and obscure.  There
> is probably some MUCH easier way to achieve the goal.  If you would just
> tell us the goal, we might be able to help you do it.
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]