<?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 Re: Regex after delimited field extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-after-delimited-field-extraction/m-p/64757#M15992</link>
    <description>&lt;P&gt;Ah. That's pretty cool. I will try this on Monday. Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 14 Dec 2012 22:44:29 GMT</pubDate>
    <dc:creator>tnkoehn</dc:creator>
    <dc:date>2012-12-14T22:44:29Z</dc:date>
    <item>
      <title>Regex after delimited field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-after-delimited-field-extraction/m-p/64754#M15989</link>
      <description>&lt;P&gt;After a delimited field extraction in transforms.conf, I have a field called Gateway_Name that contains, for example, a value of "den01gsx01". I am trying to perform a regex on that field in props.conf to extract "den01". I was told I could to it this way but I do not even get a Site field extracted.  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;My props.conf looks like this:
[test]
REPORT-parsefields = test_parse
EXTRACT-site = (?&amp;lt;Site&amp;gt;^\w{5}) in Gateway_Name

My transforms.conf looks like this:
[test_parse]
DELIMS = "|"
FIELDS = "Event_Header", "Gateway_Name", "Accounting_ID", "Start_Date", "Start_Time", "Disconnect_Date", "Disconnect_Time", "Call_Duration", "Disconnect_Reason", "Service_Delivered", "Call_Direction", "Calling_Number", "Called_Number", "Billing_Number", "Route_Label"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Am I doing something wrong? Is there a better way?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2012 17:48:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-after-delimited-field-extraction/m-p/64754#M15989</guid>
      <dc:creator>tnkoehn</dc:creator>
      <dc:date>2012-12-14T17:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: Regex after delimited field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-after-delimited-field-extraction/m-p/64755#M15990</link>
      <description>&lt;P&gt;REPORT rules fire &lt;EM&gt;after&lt;/EM&gt; EXTRACT rules; the Gateway_Name field won't exist to look for Site within it (EXTRACT-site). Consider a regular expression that's anchored on the delimiter.&lt;/P&gt;

&lt;P&gt;You can try something like &lt;CODE&gt;([^|])*|){&amp;lt;N&amp;gt;}&lt;/CODE&gt; where N is the number of pipe-separated fields to skip. Looks like it should be 1.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2012 18:02:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-after-delimited-field-extraction/m-p/64755#M15990</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2012-12-14T18:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: Regex after delimited field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-after-delimited-field-extraction/m-p/64756#M15991</link>
      <description>&lt;P&gt;REPORT runs after EXTRACT as sowings says, but you can quite simply get the effect you want by setting up your EXTRACT-site rule as a REPORT instead. REPORTS are processed in lexicographic order, so you can just do props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[test]
REPORT-parsefields = test_parse
REPORT-site = site
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;which will run REPORT-site/site &lt;EM&gt;after&lt;/EM&gt; REPORT-parsefields/test_parse. Then in transforms.conf, you would add:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[site]
SOURCE_KEY = Gateway_Name
REGEX = (?&amp;lt;Site&amp;gt;^\w{5})
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Dec 2012 20:43:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-after-delimited-field-extraction/m-p/64756#M15991</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2012-12-14T20:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: Regex after delimited field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-after-delimited-field-extraction/m-p/64757#M15992</link>
      <description>&lt;P&gt;Ah. That's pretty cool. I will try this on Monday. Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2012 22:44:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-after-delimited-field-extraction/m-p/64757#M15992</guid>
      <dc:creator>tnkoehn</dc:creator>
      <dc:date>2012-12-14T22:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Regex after delimited field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-after-delimited-field-extraction/m-p/64758#M15993</link>
      <description>&lt;P&gt;Worked great! Thx!&lt;/P&gt;</description>
      <pubDate>Tue, 18 Dec 2012 17:16:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-after-delimited-field-extraction/m-p/64758#M15993</guid>
      <dc:creator>tnkoehn</dc:creator>
      <dc:date>2012-12-18T17:16:40Z</dc:date>
    </item>
  </channel>
</rss>

