func Gmatch(text, expr string, iter func([]string)) {
	String(expr).Gmatch(text, iter)
}
Gmatch returns an iterator function that, each time it is called, returns the next captures
from pattern over the string s. If pattern specifies no captures, then the whole match is
produced in each call.

As an example, the following loop will iterate over all the words from string s, printing
one per line:

s = "hello world from Lua"
for w in string.gmatch(s, "%a+") do
print(w)
end

The next example collects all pairs key=value from the given string into a table:

t = {}
s = "from=world, to=Lua"
for k, v in string.gmatch(s, "(%w+)=(%w+)") do
t[k] = v
end

For this function, a caret '^' at the start of a pattern does not work as an anchor, as this
would prevent the iteration.
package strings
import (
	"strings"
	"github.com/Azure/golua/pkg/pattern"
)
type Replacer interface {
	Replace(string) string
}
func MatchAll(text, expr string, limit int) (captures [][]string) {
	return String(expr).MatchAll(text, limit)
}
func Match(text, expr string) (captures []string) {
	return String(expr).Match(text)
}
func FindAll(text, expr string, limit int) (captures [][]int) {
	return String(expr).FindAll(text, limit)
}
func Find(text, expr string) (captures []int) {
	return String(expr).Find(text)
}