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!

New Case Study: How LSU’s Student-Powered SOCs and Splunk Are Shaping the Future of ...

Louisiana State University (LSU) is shaping the next generation of cybersecurity professionals through its ...

Splunk and Fraud

Join us on November 13 at 11 am PT / 2 pm ET!Join us for an insightful webinar where we delve into the ...

Build Your First SPL2 App!

Watch the recording now!.Do you want to SPL™, too? SPL2, Splunk's next-generation data search and preparation ...