From: Yasuo Saito Date: 2002-06-29T00:07:20+09:00 Subject: Re: Negation of regular expression > class A > def initialize(string) > @string = string > end > def execute(regexp, truth=true) > if (@string =~ regexp) == truth then > # ... > else > # ... > end > end > end > > > class B > def execute(a, regexp) > a.execute(regexp, false) # ERROR... How should I do? > end > end > > B.new.execute(A.new("foo"), /bar/) Thanks again. But, I don't want to use a `flag', if possible. So, I'll change my question a little. If a certain regular expression is given, can the negation of the regular expression also be expressed by a regular expression? -- Y.Saito