[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "And" extended matching operator
From: |
Irek Szczesniak |
Subject: |
Re: "And" extended matching operator |
Date: |
Tue, 4 Dec 2012 14:44:14 +0100 |
On Mon, Dec 3, 2012 at 7:48 PM, Dan Douglas <ormaaj@gmail.com> wrote:
> On Wednesday, November 28, 2012 07:23:17 PM Nikolai Kondrashov wrote:
>> @(a&!(b))
>
> This is the syntax ksh93 already uses. So far nobody else has adopted it, but
> the equivalent as you already mentioned is the transformation to:
>
> !(!(...)|!(...))
>
> It's just a matter of implementing it. Other handy matching features still
> missing are the non-greedy modifier for pattern-lists, arbitrary quantifiers,
> and grouping for patterns (already supported for ERE only with BASH_REMATCH,
> but there's no .sh.match equivalent.)
Well, before bash can implement a .sh.match equivalent it first must
support multidimensional arrays (.sh.match is a one-dimensional array
for ${s/} matches and a 2D array for ${s//} matches).
Irek