![]() |
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. |
| All times are GMT. The time now is 10:21 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.