Re: Bug in extended pattern matching *!()

2012-09-27 Thread Chet Ramey
On 9/26/12 10:07 PM, hans1wo...@gmail.com wrote: > See also this thread: http://stackoverflow.com/questions/12596468/ > > It looks like there is some bug in the pattern matcher > > $ shopt -s extglob > $ touch a ab ba > $ echo a*!(x) > > Expected result: > a ab > Experienced result: > ab The qu

Re: Bug in extended pattern matching *!()

2012-09-27 Thread hans1worst
> The question is whether or not !(x) should match the empty string. The > bash matcher treats it similarly to [!x], which does not. It does however match the empty string at most times. So I guess that's the real bug. Again, there is some inconsistency in $ echo *!(x)a # does match empty string

Re: Bug in extended pattern matching *!()

2012-09-27 Thread hans1worst
> $ echo a*!(x) # does not > ba Sorry, that should of course be $ echo a*!(x) # does not ab