----- Original Message ----- From: "Daniel Carrera" <dcarrera / math.umd.edu> To: "ruby-talk ML" <ruby-talk / ruby-lang.org> Sent: Thursday, July 10, 2003 12:21 AM Subject: Re: Ruby T-Shirt Idea > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Okay, ignore my last question (except the one about a link to PicAxe). I just figured the > syntax (basically by trying every possible permutation). > > Now I have a new question: Turning a string into a regex. > Example: > > dcarrera ~ $ irb > >> var = "he" > => "he" > >> str = "hello world" > => "hello world" > >> str =~ /var/ > => nil > > What am I doing wrong? You can do str =~ /#{var}/ I think... Hal