Splunk Search

Extracting fields using regex

kailun92
Communicator

When i try to extract a field using this (?i)humidity : (?P.+) expression. The result below is given. Is there anyway to extract just 0.82 which is the humidity I needed ? Need help on this, thanks in advance 😃

0.82
icon : cloudy
ozone : 263.15
precipIntensity : 0.001
precipProbability : 0.05
precipType : rain
pressure : 1005.57
summary : Dry and Overcast
temperature : 80.94

1 Solution

chris
Motivator

How about:

(?i)humidity : (?P<fieldname>[\d\.]+)

View solution in original post

chris
Motivator

How about:

(?i)humidity : (?P<fieldname>[\d\.]+)

kailun92
Communicator

Check you with you, do you know how to extract summary : Dry and Overcast ? Same situation. If cannot then how about icon ? how to extract the words out ? I am extraction the part below it also.

0 Karma

kailun92
Communicator

Thank you SO MUCH, i love you i have been solving for so long

0 Karma
Get Updates on the Splunk Community!

Unlock Database Monitoring with Splunk Observability Cloud

  In today’s fast-paced digital landscape, even minor database slowdowns can disrupt user experiences and ...

Purpose in Action: How Splunk Is Helping Power an Inclusive Future for All

At Cisco, purpose isn’t a tagline—it’s a commitment. Cisco’s FY25 Purpose Report outlines how the company is ...

[Upcoming Webinar] Demo Day: Transforming IT Operations with Splunk

Join us for a live Demo Day at the Cisco Store on January 21st 10:00am - 11:00am PST In the fast-paced world ...