EXPAND ALL
  • Home

_match_regex_rule

This function checks the input string (second arg) for a match with the regex pattern rules(first arg). The regex pattern must match the full string. For example, the pattern 'abc' doesn't match the string 'abcd' but the pattern 'abc*' does match that string. We support google RE2 syntax. More details on that syntax can be found here.

Returns: STRING

string representing the name of the first rule that matched or an empty string if no match.

Arguments

VariableTypeDescription
arg1STRINGThe encoded json map from the name of the rule to the regex pattern for the rule.
arg2STRINGThe string column to match the pattern against.

Examples:

df.is_match = px.regex_match('{"rule1": ".*my_regex_pattern.*"}', df.resp_body)
This site uses cookies to provide you with a better user experience. By using Pixie, you consent to our use of cookies.