Sample data
[A028 : 00]
[F037 : 928323177452]
[F038 : 456137]
[F039 : 0]
The query below is working but i wanted to merge, basically i wanted to use rex field=_raw just once. How to extract multiple fields
index=au_axs_common_log sourcetype=anz_axs_auth_core_log "[A028" |rex field=_raw "(\[F039\s*:(?.*?)\])"| rex field=_raw "\[A028\s*:(?.*?)\]" |stats count by axrc,vrc
@venky1544 It fetches/matching all the four fields. I wanted to match only two fields. Can you please share your thoughts.
PFB screenshot hope this helps
| makeresults |eval new = "[A028 : 00]"
|append [|makeresults |eval new="[F037 : 928323177452]"]
|append [|makeresults |eval new="[F038 : 456137]"]
|append [|makeresults |eval new="[F039 : 0]"]
|rex field=new "(\[A028|\[F038)\s:\s(?<num>\d+)\]"
try this regex \[\w+\s:\s\d+\]
just curious what are you doing with the regex coz there is no named group in the regex ??
is this a tweaked query you pasted here