[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:31:54 +0200 |
On Sun, Jan 27, 2013 at 10:07 AM, Mart Frauenlob
<address@hidden> > x=abc
> $ echo "${x/!([[:alpha:]])}"
>
> $ echo "${x/[![:alpha:]]}"
> abc
>
> still why does the first example remove all alphabetic chars, there can't be
> a match???
because inside [[:alpha:]] only matches 1 character
so abc is not match by alpha since it is 3 character, abc is the
longest string that doesn't match and it removed
you get abc with:
x=abc;echo ${x/!(+([[:alpha:]]))}
- [Help-bash] ${var//!([[:class:]])} removing characters of the [:class:], Mart Frauenlob, 2013/01/26
- Re: [Help-bash] ${var//!([[:class:]])} removing characters of the [:class:], Clark WANG, 2013/01/26
- Re: [Help-bash] ${var//!([[:class:]])} removing characters of the [:class:], John Kearney, 2013/01/26
- Re: [Help-bash] ${var//!([[:class:]])} removing characters of the [:class:], Mart Frauenlob, 2013/01/27
- Re: [Help-bash] ${var//!([[:class:]])} removing characters of the [:class:],
Pierre Gaston <=
- Re: [Help-bash] ${var//!([[:class:]])} removing characters of the [:class:], Mart Frauenlob, 2013/01/27
- Re: [Help-bash] ${var//!([[:class:]])} removing characters of the [:class:], Pierre Gaston, 2013/01/27
- Re: [Help-bash] ${var//!([[:class:]])} removing characters of the [:class:], Mart Frauenlob, 2013/01/27
- Re: [Help-bash] ${var//!([[:class:]])} removing characters of the [:class:], Pierre Gaston, 2013/01/27
- Re: [Help-bash] ${var//!([[:class:]])} removing characters of the [:class:], Mart Frauenlob, 2013/01/27
Re: [Help-bash] ${var//!([[:class:]])} removing characters of the [:class:], Pierre Gaston, 2013/01/27