Help with Regex/Field Calculator to extract values from feed

2983
2
Jump to solution
09-07-2014 10:44 PM
SimonJackson
Occasional Contributor III

I have a GEP service pulling in bushfire incidents from a RSS feed:  NSW Rural Fire Service Current Incidents

An example of an incoming incident:

<item>

<title>Armidale Rd, Tyringham</title>

<link>

http://www.rfs.nsw.gov.au/dsp_content.cfm?cat_id=683

</link>

<category>Not Applicable</category>

<guid isPermaLink="false">tag:www.rfs.nsw.gov.au,2014-09-08:170672</guid>

<pubDate>Mon, 08 Sep 2014 05:11:00 GMT</pubDate>

<description>

<![CDATA[

ALERT LEVEL: Not Applicable<br />LOCATION: Armidale Rd, Tyringham, NSW 2453<br />COUNCIL AREA: Clarence Valley<br />STATUS: under control<br />TYPE: MVA/Transport<br />FIRE: No<br />SIZE: 0 ha<br />RESPONSIBLE AGENCY: NSW Police<br />UPDATED: 8 Sep 2014 15:11

]]>

</description>

<georss:point>-30.2425 152.487</georss:point>

</item>

This is updating my fetaure service just fine.

What I really need to do, is extract the 'STATUS: under control' to a new field in my feature service so I can symbolise upon it.

Ideally I just want all the values following STATUS:, but not the subsequent values within the description.

I have been playing with various regex patterns but still nowhere close.

Can anyone with some regex knowledge give me some pointers here?

Thanks!

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RiyasDeen
Occasional Contributor III

Hi Simon,

try this regex. 

STATUS:(.*?)(?=<)

Untitled.png

View solution in original post

2 Replies
RiyasDeen
Occasional Contributor III

Hi Simon,

try this regex. 

STATUS:(.*?)(?=<)

Untitled.png

SimonJackson
Occasional Contributor III

Bingo! Thanks loads, I owe you a few hours of my life.

0 Kudos