diff --git a/doc/_stdlib_gen/stdlib-content.jsonnet b/doc/_stdlib_gen/stdlib-content.jsonnet index dd662773d..4ef940742 100644 --- a/doc/_stdlib_gen/stdlib-content.jsonnet +++ b/doc/_stdlib_gen/stdlib-content.jsonnet @@ -387,6 +387,14 @@ local html = import 'html.libsonnet'; Returns a copy of string after eliminating leading and trailing whitespaces. |||, }, + { + name: 'match', + params: ['str', 'pat'], + availableSince: 'upcoming', + description: ||| + Matches the given str using pat as regexp pattern and returns an array of the matches. + |||, + }, { name: 'equalsIgnoreCase', params: ['str1', 'str2'], diff --git a/stdlib/std.jsonnet b/stdlib/std.jsonnet index c861a4aec..5bf1c48ca 100644 --- a/stdlib/std.jsonnet +++ b/stdlib/std.jsonnet @@ -1785,4 +1785,6 @@ limitations under the License. sha3(str):: go_only_function, trim(str):: std.stripChars(str, ' \t\n\f\r\u0085\u00A0'), + + match(str, pat):: go_only_function, }