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.) 

Of these, I think the non-greedy modifier and {n,m} quantifiers for patterns 
would be my priorities because ERE doesn't support either non-greedy matching 
or negative assertions, while only ERE supports custom quantification and 
grouping. There's also no way to use ERE for globbing, only for pattern 
matching, without also adding the ~(...) syntax, which would be a huge 
undertaking. 
-- 
Dan Douglas

Reply via email to