From: Damphyr Date: 2003-11-24T23:06:17+09:00 Subject: using variables in regular expressions Being lazy, forgetful and generally very bad with regular expressions leads me to post this question: How can I use the contents of a variable as a pattern in a regular expression? I get a list of files from a set of paths and I want to do the following repo=list_files paths repo.collect!{|entry| entry.gsub(/{variable_with_the root_I_want_to_substitute}/,"") } pretty straightforward no? V.- ____________________________________________________________________ http://www.freemail.gr - ������ �������� ������������ ������������. http://www.freemail.gr - free email service for the Greek-speaking.