From: Mmcolli00 Mom Date: 2009-01-21T07:38:00+09:00 Subject: Re: if statement not working with Hash object Sebastian Hungerecker wrote: > Mmcolli00 Mom wrote: >> if word != /Date1|packageId/ then  #<----------does not evaluate, i am >> not sure if i am using hash correctly > > This has nothing to do with hashes. word is a string /Date1|packageId/ > is a > regexp. They will never be equal. I'm pretty sure you want !~ ("does not > match") instead of != ("is not equal to") there. > > HTH, > Sebastian I thought a reg expression could be used on any string. I am confused. So if my Date1 has any value after it, I will have to have a string wildcard, correct? What are you all using for wildcards? Thanks, MC -- Posted via http://www.ruby-forum.com/.