Re: r"<path>"



On Sep 30, 1:17 pm, Kyle Hayes <mrkyleha...@xxxxxxxxx> wrote:
Is there a way to use the 'r' in front of a variable instead of
directly in front of a string? Or do I need to use a function to get
all of the slashes automatically fixed?

Is this what you're talking about?

str = "foo/bar"
re = Regexp.new(str) => /foo\/bar/

-- Mark.
.