From: Mmcolli00 Mom Date: 2009-01-21T11:11:06+09:00 Subject: Re: if statement not working with Hash object >> 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 > > I don't know what you mean. Well what I meant was that I don't understand how to check if a line in the text file contains at least 'Date1'. So anytime it the line has at least contains Date1, then it should be ignored in my code. I thought that I could use the regular expression such as: if word != /Date1/ however, I can't use the reg ex and don't know how to do that with a string. I was thinking there is a wild card so that I could use something like: if word !~ "Date1*" with '*' being any value after Date1. Thanks, MC -- Posted via http://www.ruby-forum.com/.