Thanks Chris.  That works fine.

Paul


>From: "Chris McMahon" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Re: [Wtr-general] selecting an item from a list using a 
>regularexpression
>Date: Fri, 13 Apr 2007 10:50:21 -0600
>
> > How does one get the value of a variable into a regular expression?
>
>require 'test/unit'
>
>class TC_Spike < Test::Unit::TestCase
>   def test_1950
>
>var = 1950
>data = "xxx1950xxx"
>
>assert_match(/#{var}/,data)
>end
>end
>_______________________________________________
>Wtr-general mailing list
>[EMAIL PROTECTED]
>http://rubyforge.org/mailman/listinfo/wtr-general

_________________________________________________________________
Get a FREE Web site, company branded e-mail and more from Microsoft Office 
Live! http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/

_______________________________________________
Wtr-general mailing list
[EMAIL PROTECTED]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to