All Apps and Add-ons

How do you search for a specific string?

New Member


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


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!

Detecting Remote Code Executions With the Splunk Threat Research Team

WATCH NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If exploited, ...

Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

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

.conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...