$ID &lt;id_list_rule&gt; {@&lt;prepend,{$2,$1}&gt;} | $ID {@&lt;createarray,{$1}&gt;};

/* Define main log parsing rule */
log_rule = rule &lt;catch_sq_bracket_rule&gt; &lt;id_list_rule&gt; {op(timestamp:$1,message:$2){
    return {
        timestamp: timestamp,
        message: message,
        level: &quot;INFO&quot;
    };
}};

/* Execute log parsing */
result = op()(&quot;[2024-01-15 10:30:00] User login successful&quot;, log_rule)();
/* Result: {timestamp: [2024,&quot;-&quot;,1,&quot;-&quot;,15,&quot; 