<?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 field extraction; same source, variably different fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/regex-field-extraction-same-source-variably-different-fields/m-p/192334#M55302</link>
    <description>&lt;P&gt;No reason. It's probably even better to generalize the whitespace with &lt;CODE&gt;\s&lt;/CODE&gt; as you did.&lt;/P&gt;</description>
    <pubDate>Thu, 02 Jan 2014 21:18:37 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2014-01-02T21:18:37Z</dc:date>
    <item>
      <title>regex field extraction; same source, variably different fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-field-extraction-same-source-variably-different-fields/m-p/192330#M55298</link>
      <description>&lt;P&gt;I've got input from a syslog source, that looks like this:&lt;/P&gt;

&lt;P&gt;2012-10-10 04:04:52[connection-5] AUTH: User xxx authenticated.&lt;/P&gt;

&lt;P&gt;2012-10-10 04:04:52[Scan Thread: document1.doc -&amp;gt; /127.0.0.1] MODULES: File analysis &lt;/P&gt;

&lt;P&gt;I want to extract the user (xxx) and document1.doc fields at search time, if possible, for inclusion in a table, and charts, etc, but am having trouble devising a rex statement in the search that can extract both values as different fields, yet from the same source.  A conditional regex is what I am looking for.  This would also be part of a transaction (the next step to undertake).  Any suggestions would be great!....&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2013 20:38:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-field-extraction-same-source-variably-different-fields/m-p/192330#M55298</guid>
      <dc:creator>gsawyer1</dc:creator>
      <dc:date>2013-12-30T20:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: regex field extraction; same source, variably different fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-field-extraction-same-source-variably-different-fields/m-p/192331#M55299</link>
      <description>&lt;P&gt;You can have multiple extract statements for a source or sourcetype...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::/yoursourcehere]
EXTRACT-e1=AUTH: User\s+(?&amp;lt;user&amp;gt;\S+)\s+authenticated.
EXTRACT-e2=Scan Thread:\s+(&amp;lt;file&amp;gt;\S+)\s
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Dec 2013 21:23:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-field-extraction-same-source-variably-different-fields/m-p/192331#M55299</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-12-30T21:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: regex field extraction; same source, variably different fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-field-extraction-same-source-variably-different-fields/m-p/192332#M55300</link>
      <description>&lt;P&gt;I attempted the following in props.conf only:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[sourcetype::mysource]  (because I already have multiple transforms applied to this source)&lt;BR /&gt;
EXTRACT-e1=AUTH: User\s+(?&amp;lt;submitter&amp;gt;\S+)\s+authenticated.&lt;BR /&gt;
EXTRACT-e2=Scan Thread:\s+(&amp;lt;file&amp;gt;\S+)\s\-\&amp;gt;\s&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;....and nothing happened.  No fields "submitter" or "file" were extracted when I ran a search for that sourcetype, looking for results that contain this data.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2014 21:02:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-field-extraction-same-source-variably-different-fields/m-p/192332#M55300</guid>
      <dc:creator>gsawyer1</dc:creator>
      <dc:date>2014-01-02T21:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: regex field extraction; same source, variably different fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-field-extraction-same-source-variably-different-fields/m-p/192333#M55301</link>
      <description>&lt;P&gt;Was there some reason why you did not use the following syntax:&lt;/P&gt;

&lt;P&gt;[source::/yoursourcehere]&lt;BR /&gt;
EXTRACT-e1=AUTH:\s+User\s+(?&lt;USER&gt;\S+)\s+authenticated.&lt;BR /&gt;
EXTRACT-e2=Scan\sThread:\s+(&lt;FILE&gt;\S+)\s\-\&amp;gt;\s&lt;/FILE&gt;&lt;/USER&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2014 21:05:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-field-extraction-same-source-variably-different-fields/m-p/192333#M55301</guid>
      <dc:creator>gsawyer1</dc:creator>
      <dc:date>2014-01-02T21:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: regex field extraction; same source, variably different fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-field-extraction-same-source-variably-different-fields/m-p/192334#M55302</link>
      <description>&lt;P&gt;No reason. It's probably even better to generalize the whitespace with &lt;CODE&gt;\s&lt;/CODE&gt; as you did.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2014 21:18:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-field-extraction-same-source-variably-different-fields/m-p/192334#M55302</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-01-02T21:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: regex field extraction; same source, variably different fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-field-extraction-same-source-variably-different-fields/m-p/192335#M55303</link>
      <description>&lt;P&gt;&lt;CODE&gt;[sourcetype::mysource]&lt;/CODE&gt; is not valid. You need to specify either&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[mysourcetypename]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[source::/pathto/mysource]&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2014 21:21:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-field-extraction-same-source-variably-different-fields/m-p/192335#M55303</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-01-02T21:21:25Z</dc:date>
    </item>
  </channel>
</rss>

