From: Martin Stannard Date: 2003-08-23T00:27:25+09:00 Subject: Re: irb regexp strangeness On Sat, 2003-08-23 at 01:02, ts wrote: > >>>>> "M" == Martin Stannard writes: > > M> Why the hang on line 4? > > You must have the same problem with !=, no ? > Yes, irb(main):010:0> 'testing' != /test/ irb(main):011:0* Found this in a previous ruby-talk message: On Sun, Aug 17, 2003 at 07:46:33PM +0900, Meino Christian Cramer wrote: > > Hi, > > Searching through "Programming Ruby" I found the Perl-like "=~" for > matching strings against regexps but I cannot find the opposite > "dont match" operator ( "!~" in Perl ). > > Is there any aequivalent ? (Actually, a !~ b is the same as !(a =~ b), i.e. there is no !~ method as such; in the same way that a += b is expanded to a = a + b and so there is no += operator as such) So this expansion only works with a String on the rhs? regards, Martin