<?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 How do I extract specific fields? in #Random</title>
    <link>https://community.splunk.com/t5/Random/How-do-I-extract-specific-fields/m-p/582539#M1408</link>
    <description>&lt;P&gt;Hi folks,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hoping you might be able to help.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've some raw logs coming in and one of the "extracted" fields is a fields with all the system information I need e.g.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Remote Desktop Protocol: OS: Windows 10/Windows Server OS Build: 10.0.18362 Target Name: NACORP NetBIOS Domain Name: NACORP NetBIOS Computer Name: 1234ABC DNS Domain Name: na.corp.xxxxx.com System Time: 2021-12-12 22:55:40.534959 Authorized Use Only - v 041001 This system is for the use of authorized users only.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;How do I extract specific pieces from it?&amp;nbsp;&lt;BR /&gt;I need&amp;nbsp;NetBIOS Domain Name and&amp;nbsp;Computer Name and&amp;nbsp;System Time&lt;BR /&gt;&lt;BR /&gt;I thought of using a regex but not sure how to build&amp;nbsp;it since&amp;nbsp;NetBIOS Domain Name values can be of different variations e'g one will be&amp;nbsp;NACORP another one will be USON and another wil be NACORP.LOCAL&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Similar with the computer name - there's no unified naming convention - it depends on a country we get the logs from. some can have a "-" in the middle, some will have a "." etc.&lt;BR /&gt;&lt;BR /&gt;Any hints and tips on how to tackle&amp;nbsp;it will be more than appreciated!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Mar 2022 16:39:25 GMT</pubDate>
    <dc:creator>klaudiac</dc:creator>
    <dc:date>2022-03-10T16:39:25Z</dc:date>
    <item>
      <title>How do I extract specific fields?</title>
      <link>https://community.splunk.com/t5/Random/How-do-I-extract-specific-fields/m-p/582539#M1408</link>
      <description>&lt;P&gt;Hi folks,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hoping you might be able to help.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've some raw logs coming in and one of the "extracted" fields is a fields with all the system information I need e.g.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Remote Desktop Protocol: OS: Windows 10/Windows Server OS Build: 10.0.18362 Target Name: NACORP NetBIOS Domain Name: NACORP NetBIOS Computer Name: 1234ABC DNS Domain Name: na.corp.xxxxx.com System Time: 2021-12-12 22:55:40.534959 Authorized Use Only - v 041001 This system is for the use of authorized users only.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;How do I extract specific pieces from it?&amp;nbsp;&lt;BR /&gt;I need&amp;nbsp;NetBIOS Domain Name and&amp;nbsp;Computer Name and&amp;nbsp;System Time&lt;BR /&gt;&lt;BR /&gt;I thought of using a regex but not sure how to build&amp;nbsp;it since&amp;nbsp;NetBIOS Domain Name values can be of different variations e'g one will be&amp;nbsp;NACORP another one will be USON and another wil be NACORP.LOCAL&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Similar with the computer name - there's no unified naming convention - it depends on a country we get the logs from. some can have a "-" in the middle, some will have a "." etc.&lt;BR /&gt;&lt;BR /&gt;Any hints and tips on how to tackle&amp;nbsp;it will be more than appreciated!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 16:39:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Random/How-do-I-extract-specific-fields/m-p/582539#M1408</guid>
      <dc:creator>klaudiac</dc:creator>
      <dc:date>2022-03-10T16:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: Information extraction</title>
      <link>https://community.splunk.com/t5/Random/How-do-I-extract-specific-fields/m-p/582578#M1409</link>
      <description>&lt;P&gt;The rex command can do that.&amp;nbsp; I prefer to use separate commands in case the data should be in a different order.&amp;nbsp; In the case of domain and computer names, the regex doesn't care about naming conventions - it just takes everything up to the next space.&amp;nbsp; We can't do the same with System Time since it has an embedded space.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=foo "NetBIOS Domain Name: (?&amp;lt;NDN&amp;gt;\S+)"
| rex field=foo "NetBIOS Computer Name: (?&amp;lt;NCN&amp;gt;\S+)"
| rex field=foo "System Time: (?&amp;lt;sysTime&amp;gt;\d+-\d+-\d+ \d+:\d+:\d+\.\d+)"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 16:31:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Random/How-do-I-extract-specific-fields/m-p/582578#M1409</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-01-26T16:31:04Z</dc:date>
    </item>
  </channel>
</rss>

