help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] ${var//!([[:class:]])} removing characters of the [:clas


From: Pierre Gaston
Subject: Re: [Help-bash] ${var//!([[:class:]])} removing characters of the [:class:]
Date: Sun, 27 Jan 2013 10:27:03 +0200

> But I don't know how to explain this result:
>
> $ echo ${v//!(foobar)/xxx}
> xxxxxx

!(foobar) first matches "fooba" (the longest string not matching
foobar) and replaces it with xxx

It then matches the r and replaces it by xxx

and yeah !(pattern) is not the most intuitive glob



reply via email to

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