From: Zach Dennis Date: 2004-02-09T13:33:18+09:00 Subject: Re: two questions >First: how can i use a variable name within a regex? Use the #{var} syntax. myvar = "a noun" mysentence = "This is a noun" puts "true" if ( mysentence =~ /#{myvar}/ ) #returns true HTH, Zach --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.576 / Virus Database: 365 - Release Date: 1/30/2004