Splunk Search

Extracting Field using Regexes

sbnoobbb
Path Finder

I have extracted the latitude using this (?i).Double">(?P[^<]+ , but i could not extract the longitude as both shares the double. Anyway that I can extract longitude ?

<updated>2013-07-04T06:03:39Z</updated>
<author>
  <name />
</author>
<link rel="edit" title="Nowcast" href="NowcastSet(1310755)" />
<category term="NEAModel.Nowcast" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<content type="application/xml">
  <m:properties>
    <d:NowcastID m:type="Edm.Int32">1310755</d:NowcastID>
    <d:Area>Yishun</d:Area>
    <d:Condition>Rain</d:Condition>
    <d:Latitude m:type="Edm.Double">1.42738834</d:Latitude>
    <d:Longitude m:type="Edm.Double">103.8290405</d:Longitude>
    <d:Summary>Rain</d:Summary>
    <d:Distance m:type="Edm.Double">0</d:Distance>
Tags (3)
1 Solution

sbnoobbb
Path Finder

I have used this and it works 😃 Thanks anyway !

(?[^<]+)</d:Longitude

View solution in original post

0 Karma

sbnoobbb
Path Finder

I have used this and it works 😃 Thanks anyway !

(?[^<]+)</d:Longitude

0 Karma

gfuente
Motivator

Hello

You can use those Regexes:

< d:Latitude m:type="Edm.Double">(?<Latitude>\d+\.\d+)< /d:Latitude>
< d:Longitude m:type="Edm.Double">(?<Latitude>\d+\.\d+)< /d:Longitude>

*Remove the blanks after the angle bracket
Regards

0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...