[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

regex does not contain - or no match

Sergio Ruiz

2/17/2009 3:06:00 AM

okay, for some reason, i am not getting this.. i am feeling very
stupid..

i am trying to find a case where the regex does NOT match..

i have tried:

string !=~/regex/

but this doesn't seem to work..

anyone have any ideas how to do this?

thanks!
--
Posted via http://www.ruby-....

2 Answers

David A. Black

2/17/2009 3:13:00 AM

0

Hi --

On Tue, 17 Feb 2009, Sergio Ruiz wrote:

> okay, for some reason, i am not getting this.. i am feeling very
> stupid..
>
> i am trying to find a case where the regex does NOT match..
>
> i have tried:
>
> string !=~/regex/
>
> but this doesn't seem to work..

string !~ /regex/


David

--
David A. Black / Ruby Power and Light, LLC
Ruby/Rails consulting & training: http://www.r...
Coming in 2009: The Well-Grounded Rubyist (http://manning....)

Ruby Training Atlanta! April 1-3, http://www.entp.com/training...

Sergio Ruiz

2/17/2009 3:42:00 AM

0


>
> string !~ /regex/
>
>
> David

wow!

that totally worked!

thanks SO much!

i can't believe that was so hard to find!

--
Posted via http://www.ruby-....