github.com/hirochachacha/plua@v0.0.0-20170217012138-c82f520cc725/stdlib/string/testdata/match.lua (about)

     1  assert(string.match("xxx", "y") == nil)
     2  assert(string.match("xxy", "y") == "y")
     3  x, y, z = string.match("x y z", "() (y) ()")
     4  assert(x == 2 and y == "y" and z == 5)