[Top][All Lists]

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

Re: "And" extended matching operator

From: Dan Douglas
Subject: Re: "And" extended matching operator
Date: Mon, 03 Dec 2012 12:48:37 -0600
User-agent: KMail/4.8.3 (Linux/3.4.6-pf+; KDE/4.8.3; x86_64; ; )

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 
Dan Douglas

reply via email to

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