|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
各位大侠
小弟初涉skill,且基础薄弱,在努力学习skill user guide,有些东西反复推敲而不得要领
无数问题,从以下问题,求大侠解惑
在skill user guide的P106中
有对于pattern matching function的用法举例一则
rexCompile("\\([a-z]+\\)\\.\\1") => t
rexExecute("abc.bc") => t
rexExecute("abc.ab") => nil
rexCompile("\\(^[a-z]+\\)\\.\\1") =>t
rexExecute("abc.bc") => nil
The caret (^) in the rexCompile pattern requires that the pattern must match from the
beginning of the input string.
其上第一行的'rexCompile("\\([a-z]+\\)\\.\\1")'最后\\1如何不得解,以至于后继用rexExecute
为什么rexExecute("abc.bc") => t
和为什么rexExecute("abc.ab") => nil
始终不明白
请大侠解惑 |
|