Splunk Search

Regex pattern

irvindominguez9
Observer

Can you help me with this regex pattern? I only need the numbers.

simNumber\"😕"2201240132708969900\"

I am using "simNumber\\\":\\\"(?<sim>[^\\]*)"

Labels (1)
0 Karma

to4kawa
Ultra Champion

| rex "simNumber\D+(?<sim>\d+)"
how about this?

 

| makeresults
| eval _raw="\"simNumber\\\":\\\"2201240132708969900\\\""
| rex "simNumber\D+(?<sim>\d+)"
| rex mode=sed "s/\\\//g"
| eval _raw="{"._raw."}"
| spath

just fun.

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

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 GA in US-AWS!

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