rule: [while [not ["--"] skip] some "-"]
parse "a-bc----d" [rule ??]
打印
??: "d"
但是我需要更有效的规则(例如,使用to #"-"
)...
编辑:
t: copy "" append/dup t "." 10000 append t "-..---..--"
rule: [while [not ["--"] skip] some "-"]
print [delta-time [loop 1000 [parse t [rule] ]]]
=>在我的手机上〜15.4秒
rule: [any ["--" break | skip] any "-"]
=>〜8.2秒
rule: [to "--" some "-"]
(@ sqlab响应)
=>〜0.3秒
答案 0 :(得分:3)
是什么使您无法使用 to 作为
rule: [to "--" some "-" x:]