On Sun, Nov 03, 2024 at 04:43:05AM +0100, #!microsuxx wrote:
> On Sun, Nov 3, 2024, 04:25 Greg Wooledge <greg@wooledge.org> wrote:
>
> > On Sun, Nov 03, 2024 at 04:00:57 +0100, #!microsuxx wrote:
> > > .. it should represent a reverse deletition
> > >
> > > // deletes
> > > the reverse // does exclude the rest
> > >
> > > the alternative is the outdated and harder from-cut-from-beginning
> > > then-from-end ...
> > >
> > > wouldnt it be a c code change like
> > > u copy the // code
> > > and make the match a ! match
> >
> > I have no idea what you're saying. Can you show us an example command
> > that you would run, and the action it would perform?
> >
>
> hi , yess
>
> str=abcdef
> changed1=${str*b!(e)}
>
> should return bcd
Using a regular expression instead of an extended shell pattern:
$ [[ $str =~ b[^e]* ]] && echo "${BASH_REMATCH[0]}"
bcd
>
> ${str*??} returns ab
> eg first matched two , reverse of / // cutoff
>
> ${str*} ${str**} nothing
> ${str**?} all
>
> and id like to request for later future a three *** , or rather some more
> stackable symbol .. that enables reusing glob-groups
>
> ${str***?(??)??(?)}
>
> would return bc and f
>
> how ? i mean to what ? is an additional question
> llike it seems to me an array dest is needed
> or just ifs usement to expand
> ++
>
> greeetss !!
>
> >
--
Andreas (Kusalananda) Kähäri
Uppsala, Sweden
.