I have items I'm trying to pick from a select list of this form:

 <groupID> - <text string>

For example, the list might be:

 4 - Denver
 5 - Atlanta
 1950 - New York City

The items in the list are always changing, and I want to pick an item by just the number. So, this actually works to select the last item in the list above:

 @ie.select_list( :name , "groupID").select(/1950 - /)

However, I have the number (the groupDI) in a variable.  So the question is:

How does one get the value of a variable into a regular expression?

Paul Hammer

_________________________________________________________________
Download Messenger. Join the i’m Initiative. Help make a difference today. http://im.live.com/messenger/im/home/?source=TAGHM_APR07

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

Reply via email to