diff --git a/pkg/stdlib/strings/regex.go b/pkg/stdlib/strings/regex.go index 0919272d..05e19c7e 100644 --- a/pkg/stdlib/strings/regex.go +++ b/pkg/stdlib/strings/regex.go @@ -43,8 +43,8 @@ func RegexMatch(_ context.Context, args ...core.Value) (core.Value, error) { return res, nil } - for _, m := range matches[0] { - res.Push(values.NewString(m)) + for _, m := range matches { + res.Push(values.NewString(m[0])) } return res, nil