<?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: How to extract from CSV using rex? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-from-CSV-using-rex/m-p/454429#M78660</link>
    <description>&lt;P&gt;Gah! I was so close! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
I couldn't find any docs on how to explicitly use the ')' for rex since it was '[^)]' in regex, so I left it off to just get thru the first issue of actually getting data. &lt;/P&gt;

&lt;P&gt;Thank you! &lt;/P&gt;</description>
    <pubDate>Tue, 24 Jul 2018 12:54:43 GMT</pubDate>
    <dc:creator>batsonpm</dc:creator>
    <dc:date>2018-07-24T12:54:43Z</dc:date>
    <item>
      <title>How to extract from CSV using rex?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-from-CSV-using-rex/m-p/454427#M78658</link>
      <description>&lt;P&gt;I have a csv file that I am trying to pull data from, this is an example of the data in the file:&lt;/P&gt;

&lt;P&gt;Action, Message, Server Connection, Service Path, Service Acct, Source IP, Time, User&lt;BR /&gt;
Retrieve password,126.259.193.138,(Action: Connect)(Connection to address: aservername01),Operating System-FHR-ServerAdmins-kochind.com-SVC_SVRACCESS_PROD_5,SVC_SVRACCESS_PROD_5,172.16.125.36,07/10/2018 15:45:41,&lt;A href="mailto:Some.Guy@nowhere.com" target="_blank"&gt;Some.Guy@nowhere.com&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;My query where I am trying to pull just the server name, "aservername01" out of the file:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup filename.csv 
| rex field=_raw "address: (?&amp;lt;Server&amp;gt;.*)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It is not returning the "Server" field with any data. Is this because it is a csv file instead of a text file? What am I missing because I'm not getting any errors from Splunk.&lt;/P&gt;

&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:34:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-from-CSV-using-rex/m-p/454427#M78658</guid>
      <dc:creator>batsonpm</dc:creator>
      <dc:date>2020-09-29T20:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract from CSV using rex?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-from-CSV-using-rex/m-p/454428#M78659</link>
      <description>&lt;P&gt;Hi batsonpm,&lt;/P&gt;

&lt;P&gt;when using &lt;CODE&gt;inputlookup&lt;/CODE&gt; you will not get a field called &lt;CODE&gt;_raw&lt;/CODE&gt;, try using the header name for this column:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field="Server Connection" "address: (?&amp;lt;Server&amp;gt;[^)]+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also note the changed regex, since your would match everything after &lt;CODE&gt;address:&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jul 2018 22:15:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-from-CSV-using-rex/m-p/454428#M78659</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2018-07-23T22:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract from CSV using rex?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-from-CSV-using-rex/m-p/454429#M78660</link>
      <description>&lt;P&gt;Gah! I was so close! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
I couldn't find any docs on how to explicitly use the ')' for rex since it was '[^)]' in regex, so I left it off to just get thru the first issue of actually getting data. &lt;/P&gt;

&lt;P&gt;Thank you! &lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 12:54:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-from-CSV-using-rex/m-p/454429#M78660</guid>
      <dc:creator>batsonpm</dc:creator>
      <dc:date>2018-07-24T12:54:43Z</dc:date>
    </item>
  </channel>
</rss>

