[olug] Character Removal

George Neill georgen at neillnet.com
Fri Oct 19 00:32:17 UTC 2007


On 10/18/07, stan at srcproductions.com <stan at srcproductions.com> wrote:
>
> I'd like to remove all characters between a '(' and the second ')'. I
> tried command lines like:


gneill at vmware ]$ echo "this (is what 123 ) a (simple) test" | perl -pe
's/(?<=\()[[:alnum:][:space:]]+//g;'
this () a () test

Might work, if you are up for using perl.

HTH,
George.



More information about the OLUG mailing list