<?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 Help with Field Extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Field-Extraction/m-p/675563#M231136</link>
    <description>&lt;P&gt;Here is my sample data;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;start=Dec 30 2023 06:07:47 duser=NT AUTHORITY\SYSTEM dvc=10.163.142.37&lt;BR /&gt;&lt;BR /&gt;I need to extract the full duser information.&amp;nbsp; Splunk only grabs NT and not the remaining of the string&lt;/P&gt;&lt;P&gt;I have the following&amp;nbsp; Regex via regex101 that works....I am grabbing whatever is between 'duser=' and ' dvc'&lt;/P&gt;&lt;P&gt;(?&amp;lt;=duser=)(.*?)(?= dvc)&lt;/P&gt;&lt;P&gt;I just don't quite understand how the field extraction part is supposed to work...&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried...&lt;/P&gt;&lt;P&gt;| rex field=_raw "'(?&amp;lt;User&amp;gt;(?&amp;lt;=duser=)(.*?)(?= dvc))'"&amp;nbsp;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;| rex field=_raw "duser=\s+(?&amp;lt;User&amp;gt;[^\\]*)"&lt;BR /&gt;&lt;BR /&gt;No errors, just not getting any data in a User field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 26 Jan 2024 19:45:57 GMT</pubDate>
    <dc:creator>secphilomath1</dc:creator>
    <dc:date>2024-01-26T19:45:57Z</dc:date>
    <item>
      <title>Help with Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Field-Extraction/m-p/675563#M231136</link>
      <description>&lt;P&gt;Here is my sample data;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;start=Dec 30 2023 06:07:47 duser=NT AUTHORITY\SYSTEM dvc=10.163.142.37&lt;BR /&gt;&lt;BR /&gt;I need to extract the full duser information.&amp;nbsp; Splunk only grabs NT and not the remaining of the string&lt;/P&gt;&lt;P&gt;I have the following&amp;nbsp; Regex via regex101 that works....I am grabbing whatever is between 'duser=' and ' dvc'&lt;/P&gt;&lt;P&gt;(?&amp;lt;=duser=)(.*?)(?= dvc)&lt;/P&gt;&lt;P&gt;I just don't quite understand how the field extraction part is supposed to work...&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried...&lt;/P&gt;&lt;P&gt;| rex field=_raw "'(?&amp;lt;User&amp;gt;(?&amp;lt;=duser=)(.*?)(?= dvc))'"&amp;nbsp;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;| rex field=_raw "duser=\s+(?&amp;lt;User&amp;gt;[^\\]*)"&lt;BR /&gt;&lt;BR /&gt;No errors, just not getting any data in a User field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2024 19:45:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Field-Extraction/m-p/675563#M231136</guid>
      <dc:creator>secphilomath1</dc:creator>
      <dc:date>2024-01-26T19:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Field-Extraction/m-p/675564#M231137</link>
      <description>&lt;P&gt;Set your anchors either side of the field extraction&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "duser=(?&amp;lt;User&amp;gt;.*?) dvc"&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 26 Jan 2024 19:53:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Field-Extraction/m-p/675564#M231137</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-01-26T19:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Field-Extraction/m-p/675574#M231140</link>
      <description>&lt;P&gt;When I put in my search like this&lt;BR /&gt;&lt;BR /&gt;| rex field=_raw "duser=(?&amp;lt;User&amp;gt;.*?) dvc"&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I get a new field called&amp;nbsp;UserNameLabel with the value of User&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2024 21:26:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Field-Extraction/m-p/675574#M231140</guid>
      <dc:creator>secphilomath1</dc:creator>
      <dc:date>2024-01-26T21:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Field-Extraction/m-p/675580#M231142</link>
      <description>&lt;P&gt;When I put in my search like this&lt;BR /&gt;&lt;BR /&gt;| rex field=_raw "duser=(?&amp;lt;User&amp;gt;.*?) dvc"&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I get a new field called&amp;nbsp;UserNameLabel with the value of 'User' not the user field data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2024 23:03:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Field-Extraction/m-p/675580#M231142</guid>
      <dc:creator>secphilomath1</dc:creator>
      <dc:date>2024-01-26T23:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Field-Extraction/m-p/675596#M231146</link>
      <description>&lt;P&gt;Please share some anonymised sample data. the search you are using, your current results and your expected results&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jan 2024 09:55:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Field-Extraction/m-p/675596#M231146</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-01-27T09:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Field-Extraction/m-p/675801#M231190</link>
      <description>&lt;P class="lia-align-left"&gt;duser=NT AUTHORITY\SYSTEM dvc=10.10.10.10 rt=Jan 29 2024 04:41:24 dhost=abcd.efgh.com SHA-1=Not available MD5=Not available Size=Not available content=0x00000001 (1) contentLabel=Current Version Content timezone=Pacific Standard Time&lt;/P&gt;&lt;P class="lia-align-left"&gt;I want to be able to pull out the duser, dvc, dhost etc.&amp;nbsp; Focusing on the duser ATM because it is giving me the most grief because of the space in the value.&amp;nbsp; If I can get one to work, I can get the rest working.&lt;/P&gt;&lt;P class="lia-align-left"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-left"&gt;The search so far is simple;&lt;/P&gt;&lt;P class="lia-align-left"&gt;index="abc"&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-left"&gt;| rex field=_raw "duser=(?P&amp;lt;User&amp;gt;.*?) dvc"&lt;/P&gt;&lt;P class="lia-align-left"&gt;| table User&lt;/P&gt;&lt;P class="lia-align-left"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-left"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-left"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2024 17:19:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Field-Extraction/m-p/675801#M231190</guid>
      <dc:creator>secphilomath1</dc:creator>
      <dc:date>2024-01-29T17:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Field-Extraction/m-p/675809#M231195</link>
      <description>&lt;LI-CODE lang="markup"&gt;| rex "duser=(?&amp;lt;duser&amp;gt;.*?) dvc=(?&amp;lt;dvc&amp;gt;\S+).*dhost=(?&amp;lt;dhost&amp;gt;\S+)"&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 29 Jan 2024 18:17:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Field-Extraction/m-p/675809#M231195</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-01-29T18:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Field-Extraction/m-p/675810#M231196</link>
      <description>&lt;P&gt;Wow, thanks so much!&amp;nbsp; That solves all my problems!&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2024 18:20:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Field-Extraction/m-p/675810#M231196</guid>
      <dc:creator>secphilomath1</dc:creator>
      <dc:date>2024-01-29T18:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Field-Extraction/m-p/675813#M231200</link>
      <description>&lt;P&gt;Oh wait these have to be in order, what if I wanted to grab a field that is 10 fields before this.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Expanded Sample Data;&lt;BR /&gt;&lt;BR /&gt;dvchost=asdf.ghi.com NodeType=Windows Server NodeTypeLabel=Node Type Rule=Critical System Settings RuleLabel=Rule RuleType=Windows Registry Rule RuleTypeLabel=Rule Type fname=HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer|NoWebServices ChangeType=Added ChangeTypeLabel=Change Type SeverityName=High SeverityNameLabel=Tripwire Severity Name VersionOID=-1y2p0ij32e8cf:-1y2p0iizs0ilf VersionOIDLabel=Version OID SeverityNumber=10000 SeverityNumberLabel=Tripwire Severity Number sproc=C:\Windows\System32\svchost.exe licurl=&lt;A href="https://abcd.ghi.com/console/lic.search.cmd?lic=true&amp;amp;managerId=nodeManager&amp;amp;pageId=nodeManager.elementFinderPage&amp;amp;searchCriteria=%7B%22search.element.nodeGroup.selectedObject%22%3A%22-1y2p0ij32e8bm%3A-1y2p0ij02lp4k%22%2C%22search.element.name.op%22%3A1%2C%22search.element.name%22%3A%22HKEY_LOCAL_MACHINE%5C%5CSoftware%5C%5CMicrosoft%5C%5CWindows%5C%5CCurrentVersion%5C%5CPolicies%5C%5CExplorer|" target="_blank"&gt;https://abcd.ghi.com/console/lic.search.cmd?lic=true&amp;amp;managerId=nodeManager&amp;amp;pageId=nodeManager.elementFinderPage&amp;amp;searchCriteria=%7B%22search.element.nodeGroup.selectedObject%22%3A%22-1y2p0ij32e8bm%3A-1y2p0ij02lp4k%22%2C%22search.element.name.op%22%3A1%2C%22search.element.name%22%3A%22HKEY_LOCAL_MACHINE%5C%5CSoftware%5C%5CMicrosoft%5C%5CWindows%5C%5CCurrentVersion%5C%5CPolicies%5C%5CExplorer|&lt;/A&gt;NoWebServices%22%2C%22selectedSearchType%22%3A%22element%22%2C%22search.element.ruleGroup.selectedObject%22%3A%22-1y2p0ij32e7p1%3A-1y2p0ij32bgh0%22%2C%22criteria.searchExecuted%22%3Atrue%7D start=Jan 07 2024 06:07:45 duser=NT AUTHORITY\SYSTEM dvc=10.10.10.10 rt=Jan 29 2024 04:41:24 dhost=abcd.ghi.com SHA-1=Not available MD5=Not available Size=Not available content=0x00000001 (1) contentLabel=Current Version Content timezone=Pacific Standard Time timezoneLabel=Time Zone elementOID=-1y2p0ij32e8ca:-1y2p0ij02lo5f elementOIDLabel=Element OID blVersion=false blVersionLabel=Is baseline version hardCodedIP=10.10.10.10&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Say I wanted the fields NodeType, RuleType, fname, duser, sproc?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2024 18:58:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Field-Extraction/m-p/675813#M231200</guid>
      <dc:creator>secphilomath1</dc:creator>
      <dc:date>2024-01-29T18:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Field-Extraction/m-p/675833#M231207</link>
      <description>&lt;P&gt;As I said in my original reply, you just have to set up the anchors correctly. regex101.com is a great site for testing regex.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2024 22:59:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Field-Extraction/m-p/675833#M231207</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-01-29T22:59:55Z</dc:date>
    </item>
  </channel>
</rss>

