Lua模式返回零

时间:2017-11-18 13:58:54

标签: regex lua lua-patterns

这场比赛的回归为零,即使我的眼睛还可以。 string:match("^This boots belongs to the player (.-)%.$")

字符串是

legendary boots. It can only be wielded properly by players of level 70 or higher. It weighs 8.00 oz. This boot has less regeneration than a soft boots, but it is infinite. This boots belongs to the player Administrador.

它应该返回玩家名称" Administrador",但总是返回nil。我做错了什么?

1 个答案:

答案 0 :(得分:3)

Lua似乎没有提供一种方法来接收不同的标志,以便改变某些锚点/标记的行为。这么说,^表示字符串的开头不是行的开头。只需删除它。