Help with Regex/Field Calculator to extract values from feed

3443
2
Jump to solution
09-07-2014 10:44 PM
SimonJackson
Frequent Contributor

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)
This widget could not be displayed.
This widget could not be displayed.
1 Solution

Accepted Solutions
RiyasDeen
Frequent Contributor

Hi Simon,

try this regex. 

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

Untitled.png

View solution in original post

This widget could not be displayed.
This widget could not be displayed.
2 Replies
RiyasDeen
Frequent Contributor

Hi Simon,

try this regex. 

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

Untitled.png

This widget could not be displayed.
This widget could not be displayed.
SimonJackson
Frequent Contributor

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

This widget could not be displayed.
This widget could not be displayed.