【发布时间】:2014-04-08 17:51:38
【问题描述】:
我有一个这样的字符串
I run the "(.*)" query from the "(.*)" file
我有一个包含这些值的数组,['process_date', 'dates']
我需要将其中的值替换到我的字符串中,就像这样
I run the "process_date" query from the "dates" file.
原来我是这样的
selected_item = selected_item.gsub(/\(\.\*\)/, input_value).rstrip
但现在我需要修改它以使用任意数量的输入。
任何帮助将不胜感激。
谢谢!
【问题讨论】: