Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这个正则表达式:
/(.*wwa)?#{var}([1-2]?)/
我收到两个警告:Regexp has invalid interval regexp has '}' without escape
我敢肯定这是我失踪的明显东西,但我找不到它是什么。
我可以重现这一点的唯一方法是回到 Ruby 1.8.7 并var包含contains #{},可选地在括号之间添加一些内容。
var
#{}
首先,如果你升级你的 Ruby,你不应该再遇到这些错误。
var其次,如果确实有插值字符串,我怀疑你有一个错误。