Splunk Search

rex for three fields

indeed_2000
Motivator

hi 

what is rex for these three fields?

here is the log:
2021-10-14 12:51:20,412 INFO [APP] log in : A12345@#4321@california
2021-10-14 12:51:20,412 INFO [APP] log in : D12345@torrento
2021-10-14 12:51:20,412 INFO [APP] log in : B12345@#1234@newyork

field1=A12345
D12345
B12345

field2=4321
1234

field3=california
torrento
newyork

 

thanks

Labels (3)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| rex ":\s(?<field1>[^@]+)@(#(?<field2>[^@]+)@|)(?<field3>.+)"

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
| rex ":\s(?<field1>[^@]+)@(#(?<field2>[^@]+)@|)(?<field3>.+)"
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...