[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: Regular exp negation was Perl expression



I am using extended regex ie that works with egrep. What I am particularly
interested in is:

bash has some elementary string operations like % and #. So that
${var%pattern} would delete the portion of $var that matches the pattern
keeping the rest in $var. I want the reverse operator, ie given a variable
var i want to retain a specific pattern and reject the rest.

 This is a piece of cake in tcl ( should be in perl too ;) but looking for
ways to do it in bash.  

In case of there was some negation operator I can do it with the % or #
tools

sreangsu

On Tue, 9 Jan 2001, Shridhar Daithankar wrote:

> Hi Sreangsu
> 
> With what you are trying to do this? I think grep/flex/regexp.h/perl  has slightly different syntax for such stuff..
> 
> Correct me if I am wrong..
> 
> Bye
>   Shridhar