From: jake kaiden Date: 2011-07-28T01:01:46+09:00 Subject: Re: if condition for pattern matching Dave Baldwin wrote in post #1013388: > You need to quote the string, i.e. > string1 = '/dev/sda1' > > Dave. if "pass" is not a method or a local variable, you will also need to quote that... string1 = "/dev/sda1" if string1 =~ /\/dev\// then puts "pass" end Rob's suggestion from your string manipulation post is also a handy one, i find reading regexes easier when they are written as %r{/dev/}, rather than /\/dev\// - j -- Posted via http://www.ruby-forum.com/.