Splunk Search

Find text in field

msarro
Builder

I am working to try and correlate two types of records. Each has telephone number fields called Calling_Number and Called_Number. Basically one data source lists the Calling_Number field in this format: +15555551212, whereas the second source lists it as 5555551212. Is it possible, basing the search off of the second data source, to search all of the Calling_Number fields in the first data source for the raw text of the number? I'm trying to find ways to correlate these records and splunk isn't working so well in this endeavor 😕 What would be awesome is something equivilent to an SQL LIKE command.

Tags (1)
0 Karma
1 Solution

dwaddle
SplunkTrust
SplunkTrust

The easiest thing to do might be to just create a new field based on Calling_Number, and use that for transaction or other correlation methods. Something like:

... | rex field="Calling_Number" "(+1)?(?<Bare_calling_number>\d+)"

would give you a new field called Bare_calling_number without the +1 on the head of it.

View solution in original post

dwaddle
SplunkTrust
SplunkTrust

The easiest thing to do might be to just create a new field based on Calling_Number, and use that for transaction or other correlation methods. Something like:

... | rex field="Calling_Number" "(+1)?(?<Bare_calling_number>\d+)"

would give you a new field called Bare_calling_number without the +1 on the head of it.

msarro
Builder

As of now I am working around it, but knowing the rex should help a bit. I really need to find a guide on PCRE. Thanks!

0 Karma
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!

Think Like an Architect: Introducing the Splunk Certified Cybersecurity Defense ...

In cybersecurity, defenders respond to threats. Architects design the systems that stop them.    As ...

Best Practices: Splunk auto adjust pipeline queue

When you enable autoAdjustQueue in Splunk, maxSize should be understood as the queue size Splunk starts with ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...