Match the regular expression in pattern against value. Returns a match object, with the boolean property matches to indicate whether the regular expression matched and, if requested, the matching groups as groups. The groups can optionally be named using the group_names array. If not named, the groups names are strings starting with “0”.
rule "function UpdateFailureReason"
when
has_field(“FailureReason”)
then
let update_failurereason = regex(“Failure Reason:\s+(>?([^\s].*)$)”, to_string($message.full_message));
set_field(“FailureReasonUpdated”,update_failurereason[“0”]);
end
I still don’t see a new field called FailureReasonUpdated with results from regex function.