![](/img/trans.png)
[英]When I run this, there is a something wrong in the sum+=n statement, I don't know how to fix it
[英]Error I have gotten a few times and I don't know how to fix it
我不斷看到未定義的(?...)
序列:某些東西。 對於這個特別的我。
/(?<!\d)[0-3]?\d(?!\d)/
但這對我來說已經發生過幾次了,我不確定如何解決。
這些總是以盧布形式工作,但是當我運行它時我得到那個錯誤?
請幫助!
它在這里工作:
rituraj@rituraj:~$ irb
2.1.1 :001 > s = "somestring 23 and 34 and 233"
=> "somestring 23 and 34 and 233"
2.1.1 :002 > s.scan(/(?<!\d)[0-3]?\d(?!\d)/)
=> ["23", "34"]
檢查您的紅寶石版本:
Ruby的regex引擎不支持小於1.9的向后搜索。
您需要切換到1.9+。
可選用法:可以使用oniguruma
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.