Skip to main content

MustCreateDynamicLogRegex

Creates a regular expression that matches a dynamic log variable with the specified name, ignoring case. It compiles the regex using regexp.MustCompile.

def MustCreateDynamicLogRegex(
varName: string
) - > *regexp.Regexp

Creates a regular expression that matches a dynamic log variable within a task configuration. This function is used to dynamically extract values from log entries based on a specified variable name.

Parameters

NameTypeDescription
varNamestringThe name of the variable to create a regular expression for. This variable name will be embedded into the regex pattern.

Returns

TypeDescription
*regexp.RegexpA compiled regular expression object that can be used to find the dynamic log variable.