From: JCYoder@... Date: 2005-09-03T01:16:25+09:00 Subject: variables in regex Does anyone know how I can write a regular expression using a variable in a range? For example: string.scan(/(.{1, variable})(?: |$)/).join("\n") This generates the following error: warning: regexp has invalid interval warning: regexp has `}' without escape I have seen some postings where RegEx.quote(variable) is used but this does not seem to work in a range.