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.