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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...