-
一个是对Lua的正则表达式不熟悉;
1
2
3
|
local s =
"am+df"
print(string.find(s,
"m+"
,1,
false
)) -- 2 2
true
)) -- 2 3
|
)) -- 2 2 m
1
2
3
|
local s =
"am+df"
ottom:auto!important; float:none!important; left:auto!important; line-height:1.1em!important; outline:0px!important; overflow:visible!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,
"((m+))"
ottom:auto!important; float:none!important; left:auto!important; line-height:1.1em!important; outline:0px!important; overflow:visible!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,
false
)) -- 2 2 m m
"(((m+)))"
)) -- 2 2 m m m
|
)) -- nil
"()(m+)()"
)) -- 2 2 2 m 3