On Jan 21, 3:11 ¨Βν¬ Ννγομμι°ΝοΌννγίγομμ®®®ΐωαθοο®γονχςοτεΊ > >> 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 viahttp://www.ruby-forum.com/. If you want to check only whether line contains 'Date1' you can simply use line.include? 'Date1'