<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Interactive Field Extraction (IFX) (Regex) in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Interactive-Field-Extraction-IFX-Regex/m-p/104825#M27164</link>
    <description>&lt;P&gt;Original message &lt;CODE&gt;&amp;lt;d:Message&amp;gt;(22/7)17:53 Accident on AYE (towards Tuas) after Jurong Port Rd Exit. Avoid lanes 2 and 3.&amp;lt;/d:Message&amp;gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;My XML at here &lt;A href="http://pastebin.com/98zg3tRX"&gt;Xml Data&lt;/A&gt;. How to extract all the exits only (e.g. Jurong Port Rd Exit) ? &lt;/P&gt;

&lt;P&gt;I needed all the accident extracted by generated regex expression &lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.3/Knowledge/ExtractfieldsinteractivelywithIFX"&gt;Interactive Field Extraction (IFX) feature&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I am currently using Generated pattern (regex) of &lt;STRONG&gt;(?i)Area&amp;gt;(?P&lt;MESSAGE&gt;[^&amp;lt;]+)&lt;/MESSAGE&gt;&lt;/STRONG&gt;.&lt;BR /&gt;
It extracted this:&lt;/P&gt;

&lt;P&gt;&lt;IMG src="http://splunk-base.splunk.com//storage/extracttime_until_dot.png" alt="alt text" /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Jul 2013 06:50:32 GMT</pubDate>
    <dc:creator>kailun92</dc:creator>
    <dc:date>2013-07-24T06:50:32Z</dc:date>
    <item>
      <title>Interactive Field Extraction (IFX) (Regex)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Interactive-Field-Extraction-IFX-Regex/m-p/104825#M27164</link>
      <description>&lt;P&gt;Original message &lt;CODE&gt;&amp;lt;d:Message&amp;gt;(22/7)17:53 Accident on AYE (towards Tuas) after Jurong Port Rd Exit. Avoid lanes 2 and 3.&amp;lt;/d:Message&amp;gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;My XML at here &lt;A href="http://pastebin.com/98zg3tRX"&gt;Xml Data&lt;/A&gt;. How to extract all the exits only (e.g. Jurong Port Rd Exit) ? &lt;/P&gt;

&lt;P&gt;I needed all the accident extracted by generated regex expression &lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.3/Knowledge/ExtractfieldsinteractivelywithIFX"&gt;Interactive Field Extraction (IFX) feature&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I am currently using Generated pattern (regex) of &lt;STRONG&gt;(?i)Area&amp;gt;(?P&lt;MESSAGE&gt;[^&amp;lt;]+)&lt;/MESSAGE&gt;&lt;/STRONG&gt;.&lt;BR /&gt;
It extracted this:&lt;/P&gt;

&lt;P&gt;&lt;IMG src="http://splunk-base.splunk.com//storage/extracttime_until_dot.png" alt="alt text" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2013 06:50:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Interactive-Field-Extraction-IFX-Regex/m-p/104825#M27164</guid>
      <dc:creator>kailun92</dc:creator>
      <dc:date>2013-07-24T06:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: Interactive Field Extraction (IFX) (Regex)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Interactive-Field-Extraction-IFX-Regex/m-p/104826#M27165</link>
      <description>&lt;P&gt;you can modify the generated regex in Manager&amp;gt;Fields&amp;gt;Field Extractions, or better to make a new one using the existing one as a starting point [don't forget to also change the field name in the updated regex].&lt;BR /&gt;
If I'm interpreting your goal correctly [extract exit name], one way would be to provide more context pattern in the regex, so for example it looks like each exit name is always preceded by before | till | at | beyond [maybe others] and ends with Exit. and you want to extract all characters between those two patterns.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2013 12:50:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Interactive-Field-Extraction-IFX-Regex/m-p/104826#M27165</guid>
      <dc:creator>paddygriffin</dc:creator>
      <dc:date>2013-07-24T12:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: Interactive Field Extraction (IFX) (Regex)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Interactive-Field-Extraction-IFX-Regex/m-p/104827#M27166</link>
      <description>&lt;P&gt;probably little more that you wanted.  I cant see the XML since its blocked for me. &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
&amp;lt;d:Message&amp;gt;\(\d+/\d+\)\d\d:\d\d\s(?&amp;lt;eventtype&amp;gt;[^\s]+)\son\s(?&amp;lt;location&amp;gt;[^\(]+)\s\((?&amp;lt;direction&amp;gt;[^\)]+)\)\safter\s(?&amp;lt;area&amp;gt;[^\.]+)&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;
If your useing IFX might looks something like this.&lt;BR /&gt;
&lt;CODE&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
&amp;lt;d:Message&amp;gt;\(\d+/\d+\)\d\d:\d\d\s(?&amp;lt;field1&amp;gt;[^\s]+)\son\s(?&amp;lt;field2&amp;gt;[^\(]+)\s\((?&amp;lt;field3&amp;gt;[^\)]+)\)\safter\s(?&amp;lt;field4&amp;gt;[^\.]+)&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;The return fields:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;eventtype=Accident&lt;/LI&gt;
&lt;LI&gt;location=Aye&lt;/LI&gt;
&lt;LI&gt;direction=toward Tuas&lt;/LI&gt;
&lt;LI&gt;area=Jurong Port Rd Exit&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;I've tested it with the sample give above.&lt;/P&gt;

&lt;P&gt;Hope this helps or gets you started. &lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2013 15:35:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Interactive-Field-Extraction-IFX-Regex/m-p/104827#M27166</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2013-07-24T15:35:37Z</dc:date>
    </item>
  </channel>
</rss>

