remove from a txt everything between "[" and "] " (included "[" and"] ")

remove from a txt everything between "[" and "] " (included "[" and"] ")

am 03.04.2008 17:00:28 von slystoner

from:
[FOOooOoOOO] this is ok1
[FOOooOOO] this is ok2

to:
this is ok1
this is ok2


tnx! :)

Re: remove from a txt everything between "[" and "] " (included "["

am 03.04.2008 17:42:18 von Jeenu

On Apr 3, 8:00 pm, slystoner wrote:
> from:
> [FOOooOoOOO] this is ok1
> [FOOooOOO] this is ok2
>
> to:
> this is ok1
> this is ok2
>
> tnx! :)

echo '[FOOooOoOOO]' | sed 's/\[[^]]\+\]//'

Re: remove from a txt everything between "[" and "] " (included "[" and "] ")

am 03.04.2008 18:04:40 von slystoner

Jeenu ha scritto:
> On Apr 3, 8:00 pm, slystoner wrote:
>> from:
>> [FOOooOoOOO] this is ok1
>> [FOOooOOO] this is ok2
>>
>> to:
>> this is ok1
>> this is ok2
>>
>> tnx! :)
>
> echo '[FOOooOoOOO]' | sed 's/\[[^]]\+\]//'

perfect,tank you!

a question: what's the best way to learn the syntax? do you know a good
manual or site? (well, a good introduction in my case... eheh!)

Re: remove from a txt everything between "[" and "] " (included "["

am 03.04.2008 18:30:18 von Jeenu

On Apr 3, 9:04 pm, slystoner wrote:
> Jeenu ha scritto:
>
> > On Apr 3, 8:00 pm, slystoner wrote:
> >> from:
> >> [FOOooOoOOO] this is ok1
> >> [FOOooOOO] this is ok2
>
> >> to:
> >> this is ok1
> >> this is ok2
>
> >> tnx! :)
>
> > echo '[FOOooOoOOO]' | sed 's/\[[^]]\+\]//'
>
> perfect,tank you!
>
> a question: what's the best way to learn the syntax? do you know a good
> manual or site? (well, a good introduction in my case... eheh!)

The core part is to learn Basic regular expressions (BRE), for which
there would be plenty of tutorials out there. Rest, it's all similar,
be it grep, sed or awk. http://www.regular-expressions.info/ could be
a good starting point. Equally good are the manuals for above
mentioned programs.