From: "Hal E. Fulton" Date: 2003-07-10T14:27:45+09:00 Subject: Re: Ruby T-Shirt Idea ----- Original Message ----- From: "Daniel Carrera" To: "ruby-talk ML" 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