Splunk Search

How to check the first character of the string is numeric or not?

nivets
Engager

I have a field called Identifier which has values of server names.  I need to check the server names first character is number or not. Could you please let help me, used regex but not able to achieve it. thanks

eg ., server names

01234server1

01256server2

2345server3

Abcserver

bcdserver

 

 

 

Labels (3)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Try something like this

| eval number=if(match(identifier,"^\d"),"True","False")
0 Karma
Get Updates on the Splunk Community!

3 Ways to Make OpenTelemetry Even Better

My role as an Observability Specialist at Splunk provides me with the opportunity to work with customers of ...

What's New in Splunk Cloud Platform 9.2.2406?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.2.2406 with many ...

Enterprise Security Content Update (ESCU) | New Releases

In August, the Splunk Threat Research Team had 3 releases of new security content via the Enterprise Security ...