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>.+)"
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

SOK it to Me: Top 3 Benefits of Using Splunk Operator on Kubernetes that’ll Make ...

    Thursday, July 9, 2026  |  11:00AM–12:00PM PDT Duration: 1 hour (includes Q&A) Managing can feel like a ...

Upgrade Prep for 10.4, Network Observability Deep Dives, and More from Splunk Lantern

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...

Splunk Developer Day announcements: AI agents, MCP tools, Forecasting, and Custom ...

Splunk Developer Day was packed with product and platform updates for developers building in the AI ...