From: Pistos Christou Date: 2006-03-11T00:08:52+09:00 Subject: Re: Small regexp question francisrammeloo@hotmail.com wrote: > But I want to exclude forward class declarations ( class MyClass; ) > > So I changed my pattern to: > > line =~ /^\s*class\s+(\w+)\s*[^;]/ --> don't match if line ends > with ";" > > But it doesn't work... Why? > > I ended up using: if line !~ /;/ and line =~ /^\s*class\s+(\w+)/ How does it not match? Can you show several lines of an irb session demonstrating matches and non-matches? Pistos -- Posted via http://www.ruby-forum.com/.