From: Jun Young Kim Date: 2008-12-11T17:06:30+09:00 Subject: problems in String type argument for Regular Expression Hi, I've one program to replace text's contents. def replace (aPatten, aReplace) # I need some logic to translate string to patten contents = File.read("data") contents.gsub!(aPatten, aReplace) File.open("result", "w") do |file| file << contents end end Another class give an aPatten argument as a "/[aeiou]/" and aReplace as a "*". Both of them are String type. And I know I can get a normal result when I put in /[aeiou]/ instead of "/[aeiou]/". Any ideas on how to do I convert string to patten?