All Apps and Add-ons

How do you search for a specific string?

andreiraduta
New Member

Hello,

Is there any way to search for a number which contains exactly 13 characters and starts with either 1 or 2 ?

Another question: say i have a list of names. Can i search a document to see if there are any names from the previous link present in document?

Thank you

0 Karma

richgalloway
SplunkTrust
SplunkTrust

The first question can be solved with regex. For example, the search looks for a 1 or 2 followed by 12 digits.

index=foo | regex "[12]\d{12}" | ...

The second question is unclear. Could you add some detail?

---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...