From: Nikolai Weibull Date: 2005-05-18T08:46:26+09:00 Subject: Re: Variable substitution in a regex Scott Pack wrote: > I am new to Ruby. Can I substitute the value of a > variable into a regular expression? For example: > > exp = /(\d+)/ #works > exp = /(\d+)/ + 'some string value' #Not! exp = /(\d+)#{variable}/ but I don’t understand if that’s what you want. Your example doesn’t agree with your question, nikolai -- Nikolai Weibull: now available free of charge at http://bitwi.se/! Born in Chicago, IL USA; currently residing in Gothenburg, Sweden. main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}