<?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: Field extraction with regex for Nmap result in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588586#M205002</link>
    <description>&lt;P&gt;The problem is that not all values ​​are found in splunk. I only see 8 but in the example on regex101 there are 19 different ones.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here you can see my result:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="test.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18441i33CC215BD8D7773B/image-size/large?v=v2&amp;amp;px=999" role="button" title="test.png" alt="test.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Mar 2022 09:01:58 GMT</pubDate>
    <dc:creator>bnybln030</dc:creator>
    <dc:date>2022-03-11T09:01:58Z</dc:date>
    <item>
      <title>How do I extract this field with regex for Nmap result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588564#M204995</link>
      <description>&lt;P&gt;Hi i want to extract the mac_algorithms field with regex from a nmap scan result. Does anyone have an idea how it works best? I've tried a few things, not all fields are found in Splunk.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here you can see my example:&amp;nbsp;&lt;A href="https://regex101.com/r/eJ16fA/1" target="_blank" rel="noopener"&gt;https://regex101.com/r/eJ16fA/1&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Here my nmap-scanning example:&lt;/P&gt;
&lt;P&gt;kex_algorithms: (8)&lt;BR /&gt;curve25519-sha256@libssh.org&lt;BR /&gt;ecdh-sha2-nistp256&lt;BR /&gt;ecdh-sha2-nistp384&lt;BR /&gt;ecdh-sha2-nistp521&lt;BR /&gt;diffie-hellman-group-exchange-sha256&lt;BR /&gt;diffie-hellman-group-exchange-sha1&lt;BR /&gt;diffie-hellman-group14-sha1&lt;BR /&gt;diffie-hellman-group1-sha1&lt;BR /&gt;server_host_key_algorithms: (4)&lt;BR /&gt;ssh-rsa&lt;BR /&gt;ssh-dss&lt;BR /&gt;ecdsa-sha2-nistp256&lt;BR /&gt;ssh-ed25519&lt;BR /&gt;encryption_algorithms: (14)&lt;BR /&gt;aes128-ctr&lt;BR /&gt;aes192-ctr&lt;BR /&gt;aes256-ctr&lt;BR /&gt;arcfour256&lt;BR /&gt;arcfour128&lt;BR /&gt;chacha20-poly1305@openssh.com&lt;BR /&gt;aes128-cbc&lt;BR /&gt;3des-cbc&lt;BR /&gt;blowfish-cbc&lt;BR /&gt;cast128-cbc&lt;BR /&gt;aes192-cbc&lt;BR /&gt;aes256-cbc&lt;BR /&gt;arcfour&lt;BR /&gt;rijndael-cbc@lysator.liu.se&lt;BR /&gt;mac_algorithms: (19)&lt;BR /&gt;hmac-md5-etm@openssh.com&lt;BR /&gt;hmac-sha1-etm@openssh.com&lt;BR /&gt;umac-64-etm@openssh.com&lt;BR /&gt;umac-128-etm@openssh.com&lt;BR /&gt;hmac-sha2-256-etm@openssh.com&lt;BR /&gt;hmac-sha2-512-etm@openssh.com&lt;BR /&gt;hmac-ripemd160-etm@openssh.com&lt;BR /&gt;hmac-sha1-96-etm@openssh.com&lt;BR /&gt;hmac-md5-96-etm@openssh.com&lt;BR /&gt;hmac-md5&lt;BR /&gt;hmac-sha1&lt;BR /&gt;umac-64@openssh.com&lt;BR /&gt;umac-128@openssh.com&lt;BR /&gt;hmac-sha2-256&lt;BR /&gt;hmac-sha2-512&lt;BR /&gt;hmac-ripemd160&lt;BR /&gt;hmac-ripemd160@openssh.com&lt;BR /&gt;hmac-sha1-96&lt;BR /&gt;hmac-md5-96&lt;BR /&gt;compression_algorithms: (2)&lt;BR /&gt;none&lt;BR /&gt;zlib@openssh.com"&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 15:54:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588564#M204995</guid>
      <dc:creator>bnybln030</dc:creator>
      <dc:date>2022-03-11T15:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction with regex for Nmap result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588576#M204999</link>
      <description>&lt;P&gt;I am not sure what the issue is here - your regex101 example seems to show all 19 algorithms have been matched. What is your expected/required result?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 08:54:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588576#M204999</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-03-11T08:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction with regex for Nmap result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588586#M205002</link>
      <description>&lt;P&gt;The problem is that not all values ​​are found in splunk. I only see 8 but in the example on regex101 there are 19 different ones.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here you can see my result:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="test.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18441i33CC215BD8D7773B/image-size/large?v=v2&amp;amp;px=999" role="button" title="test.png" alt="test.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 09:01:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588586#M205002</guid>
      <dc:creator>bnybln030</dc:creator>
      <dc:date>2022-03-11T09:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction with regex for Nmap result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588594#M205004</link>
      <description>&lt;P&gt;There is more to the search (you have counts) - can you share your complete search?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 09:15:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588594#M205004</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-03-11T09:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction with regex for Nmap result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588602#M205006</link>
      <description>&lt;P&gt;Here is&amp;nbsp; now a picture from field extration in splunk. It is the same result like my search....&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="test2.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18442iACED9A3296801785/image-size/large?v=v2&amp;amp;px=999" role="button" title="test2.png" alt="test2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 09:25:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588602#M205006</guid>
      <dc:creator>bnybln030</dc:creator>
      <dc:date>2022-03-11T09:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction with regex for Nmap result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588626#M205009</link>
      <description>&lt;UL&gt;&lt;LI&gt;Have you tested that your events contain all 19 MAC algorithms? (This can be tested by searching for those that you believe are missed by Splunk search.)&lt;/LI&gt;&lt;LI&gt;Is it possible that MAC may appear without leading space (hence not matching "^\s+") or appear after non-whitespace characters? &amp;nbsp;MAC algorithm patterns are unique enough that you can simply use "\b" to delimit it. &amp;nbsp;This example illustrates that Splunk does extract all 19 algos if events contain them all.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval event=split("  kex_algorithms: (8)
      curve25519-sha256@libssh.org
      ecdh-sha2-nistp256
      ecdh-sha2-nistp384
      ecdh-sha2-nistp521
      diffie-hellman-group-exchange-sha256
      diffie-hellman-group-exchange-sha1
      diffie-hellman-group14-sha1
      diffie-hellman-group1-sha1
  server_host_key_algorithms: (4)
      ssh-rsa
      ssh-dss
      ecdsa-sha2-nistp256
      ssh-ed25519
  encryption_algorithms: (14)
      aes128-ctr
      aes192-ctr
      aes256-ctr
      arcfour256
      arcfour128
      chacha20-poly1305@openssh.com
      aes128-cbc
      3des-cbc
      blowfish-cbc
      cast128-cbc
      aes192-cbc
      aes256-cbc
      arcfour
      rijndael-cbc@lysator.liu.se
  mac_algorithms: (19)
      hmac-md5-etm@openssh.com
      hmac-sha1-etm@openssh.com
      umac-64-etm@openssh.com
      umac-128-etm@openssh.com
      hmac-sha2-256-etm@openssh.com
      hmac-sha2-512-etm@openssh.com
      hmac-ripemd160-etm@openssh.com
      hmac-sha1-96-etm@openssh.com
      hmac-md5-96-etm@openssh.com
      hmac-md5
      hmac-sha1
      umac-64@openssh.com
      umac-128@openssh.com
      hmac-sha2-256
      hmac-sha2-512
      hmac-ripemd160
      hmac-ripemd160@openssh.com
      hmac-sha1-96
      hmac-md5-96
  compression_algorithms: (2)
      none
      zlib@openssh.com", "
")
| mvexpand event
``` event simulation above ```

| rex field=event max_match=0 "\b(?&amp;lt;test&amp;gt;[uh]mac-[\w\-\.@]+)"​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output from the simulation is&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;event&lt;/TD&gt;&lt;TD&gt;test&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;kex_algorithms: (8)&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;curve25519-sha256@libssh.org&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ecdh-sha2-nistp256&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ecdh-sha2-nistp384&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ecdh-sha2-nistp521&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;diffie-hellman-group-exchange-sha256&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;diffie-hellman-group-exchange-sha1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;diffie-hellman-group14-sha1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;diffie-hellman-group1-sha1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;server_host_key_algorithms: (4)&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ssh-rsa&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ssh-dss&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ecdsa-sha2-nistp256&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ssh-ed25519&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;encryption_algorithms: (14)&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;aes128-ctr&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;aes192-ctr&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;aes256-ctr&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;arcfour256&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;arcfour128&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;chacha20-poly1305@openssh.com&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;aes128-cbc&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3des-cbc&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;blowfish-cbc&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;cast128-cbc&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;aes192-cbc&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;aes256-cbc&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;arcfour&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;rijndael-cbc@lysator.liu.se&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;mac_algorithms: (19)&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;hmac-md5-etm@openssh.com&lt;/TD&gt;&lt;TD&gt;hmac-md5-etm@openssh.com&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;hmac-sha1-etm@openssh.com&lt;/TD&gt;&lt;TD&gt;hmac-sha1-etm@openssh.com&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;umac-64-etm@openssh.com&lt;/TD&gt;&lt;TD&gt;umac-64-etm@openssh.com&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;umac-128-etm@openssh.com&lt;/TD&gt;&lt;TD&gt;umac-128-etm@openssh.com&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;hmac-sha2-256-etm@openssh.com&lt;/TD&gt;&lt;TD&gt;hmac-sha2-256-etm@openssh.com&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;hmac-sha2-512-etm@openssh.com&lt;/TD&gt;&lt;TD&gt;hmac-sha2-512-etm@openssh.com&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;hmac-ripemd160-etm@openssh.com&lt;/TD&gt;&lt;TD&gt;hmac-ripemd160-etm@openssh.com&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;hmac-sha1-96-etm@openssh.com&lt;/TD&gt;&lt;TD&gt;hmac-sha1-96-etm@openssh.com&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;hmac-md5-96-etm@openssh.com&lt;/TD&gt;&lt;TD&gt;hmac-md5-96-etm@openssh.com&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;hmac-md5&lt;/TD&gt;&lt;TD&gt;hmac-md5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;hmac-sha1&lt;/TD&gt;&lt;TD&gt;hmac-sha1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;umac-64@openssh.com&lt;/TD&gt;&lt;TD&gt;umac-64@openssh.com&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;umac-128@openssh.com&lt;/TD&gt;&lt;TD&gt;umac-128@openssh.com&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;hmac-sha2-256&lt;/TD&gt;&lt;TD&gt;hmac-sha2-256&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;hmac-sha2-512&lt;/TD&gt;&lt;TD&gt;hmac-sha2-512&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;hmac-ripemd160&lt;/TD&gt;&lt;TD&gt;hmac-ripemd160&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;hmac-ripemd160@openssh.com&lt;/TD&gt;&lt;TD&gt;hmac-ripemd160@openssh.com&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;hmac-sha1-96&lt;/TD&gt;&lt;TD&gt;hmac-sha1-96&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;hmac-md5-96&lt;/TD&gt;&lt;TD&gt;hmac-md5-96&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;compression_algorithms: (2)&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;none&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;zlib@openssh.com&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Note&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;"^\s+\K" is really just "^\s+".&lt;/LI&gt;&lt;LI&gt;An explicit "-" after "(hmac|umac)" better expresses the MAC format, thus reduces potential false positives.&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Fri, 11 Mar 2022 10:11:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588626#M205009</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-03-11T10:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction with regex for Nmap result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588638#M205010</link>
      <description>&lt;P&gt;Yes, some of my events contain all 19 MAC algorithms but not all.&amp;nbsp;Some of these algorithms only occur occasionally in other events.&lt;/P&gt;&lt;P&gt;I try your search and it looks okay:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="test3.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18445i0301155E28DB8949/image-size/large?v=v2&amp;amp;px=999" role="button" title="test3.png" alt="test3.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 10:34:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588638#M205010</guid>
      <dc:creator>bnybln030</dc:creator>
      <dc:date>2022-03-11T10:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction with regex for Nmap result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588646#M205011</link>
      <description>&lt;P&gt;These appear to be counts of the occurrence of these algorithms in your events pipeline - perhaps only these 8 are present?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 10:41:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588646#M205011</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-03-11T10:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction with regex for Nmap result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588659#M205012</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see in the field extractor that only the first entry is recognized....&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="test4.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18447iBA9E3F87F215328E/image-size/large?v=v2&amp;amp;px=999" role="button" title="test4.png" alt="test4.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 10:57:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588659#M205012</guid>
      <dc:creator>bnybln030</dc:creator>
      <dc:date>2022-03-11T10:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction with regex for Nmap result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588664#M205013</link>
      <description>&lt;P&gt;You probably need to enable multivalue field extraction?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 11:00:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588664#M205013</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-03-11T11:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction with regex for Nmap result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588671#M205015</link>
      <description>&lt;P&gt;How can i do it?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 11:03:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588671#M205015</guid>
      <dc:creator>bnybln030</dc:creator>
      <dc:date>2022-03-11T11:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction with regex for Nmap result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588758#M205037</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/243284"&gt;@bnybln030&lt;/a&gt;&amp;nbsp;wrote:&lt;P&gt;I see in the field extractor that only the first entry is recognized....&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Can you post the complete filter line in your search? (From "|" all the way to &amp;nbsp;the end or next "|") &amp;nbsp;The screenshot only captures&amp;nbsp;"\b(?&amp;lt;test&amp;gt;[hu]mac-[\w\-\.@]+)", which doesn't contain a valid SPL command. &amp;nbsp;My posted filter is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=event max_match=0 "\b(?&amp;lt;test&amp;gt;[hu]mac-[\w\-\.@]+)"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The argument "max_match=0" makes sure to match all entries in a multi-line event. &amp;nbsp;Side note: If your input &amp;nbsp;is as that screenshot shows, containing multiple lines of MAC algorithms, literally copying that regex101 into rex command without max_match=0&amp;nbsp;&lt;STRONG&gt;will&lt;/STRONG&gt;&amp;nbsp;only extract the first occurrence. &amp;nbsp;This could explain why you only got 8 in the first place. (See "Optional arguments" in&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Rex#rex" target="_blank" rel="noopener"&gt;rex&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Here is a test with all 19 algos in one event:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;With max_match=0&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval event="  kex_algorithms: (8)
      curve25519-sha256@libssh.org
      ecdh-sha2-nistp256
      ecdh-sha2-nistp384
      ecdh-sha2-nistp521
      diffie-hellman-group-exchange-sha256
      diffie-hellman-group-exchange-sha1
      diffie-hellman-group14-sha1
      diffie-hellman-group1-sha1
  server_host_key_algorithms: (4)
      ssh-rsa
      ssh-dss
      ecdsa-sha2-nistp256
      ssh-ed25519
  encryption_algorithms: (14)
      aes128-ctr
      aes192-ctr
      aes256-ctr
      arcfour256
      arcfour128
      chacha20-poly1305@openssh.com
      aes128-cbc
      3des-cbc
      blowfish-cbc
      cast128-cbc
      aes192-cbc
      aes256-cbc
      arcfour
      rijndael-cbc@lysator.liu.se
  mac_algorithms: (19)
      hmac-md5-etm@openssh.com
      hmac-sha1-etm@openssh.com
      umac-64-etm@openssh.com
      umac-128-etm@openssh.com
      hmac-sha2-256-etm@openssh.com
      hmac-sha2-512-etm@openssh.com
      hmac-ripemd160-etm@openssh.com
      hmac-sha1-96-etm@openssh.com
      hmac-md5-96-etm@openssh.com
      hmac-md5
      hmac-sha1
      umac-64@openssh.com
      umac-128@openssh.com
      hmac-sha2-256
      hmac-sha2-512
      hmac-ripemd160
      hmac-ripemd160@openssh.com
      hmac-sha1-96
      hmac-md5-96
  compression_algorithms: (2)
      none
      zlib@openssh.com"
``` event simulation above ```

| rex field=event max_match=0 "\b(?&amp;lt;test&amp;gt;[hu]mac-[\w\-\.@]+)"
| eval algocount=mvcount(test)​
| table algocount event test&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;TABLE width="791px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="83px"&gt;algocount&lt;/TD&gt;&lt;TD width="503.84375px"&gt;event&lt;/TD&gt;&lt;TD width="203.171875px"&gt;&lt;DIV class=""&gt;test&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="83px"&gt;19&lt;/TD&gt;&lt;TD width="503.84375px"&gt;&lt;PRE&gt;  kex_algorithms: (8)
      curve25519-sha256@libssh.org
      ecdh-sha2-nistp256
      ecdh-sha2-nistp384
      ecdh-sha2-nistp521
      diffie-hellman-group-exchange-sha256
      diffie-hellman-group-exchange-sha1
      diffie-hellman-group14-sha1
      diffie-hellman-group1-sha1
  server_host_key_algorithms: (4)
      ssh-rsa
      ssh-dss
      ecdsa-sha2-nistp256
      ssh-ed25519
  encryption_algorithms: (14)
      aes128-ctr
      aes192-ctr
      aes256-ctr
      arcfour256
      arcfour128
      chacha20-poly1305@openssh.com
      aes128-cbc
      3des-cbc
      blowfish-cbc
      cast128-cbc
      aes192-cbc
      aes256-cbc
      arcfour
      rijndael-cbc@lysator.liu.se
  mac_algorithms: (19)
      hmac-md5-etm@openssh.com
      hmac-sha1-etm@openssh.com
      umac-64-etm@openssh.com
      umac-128-etm@openssh.com
      hmac-sha2-256-etm@openssh.com
      hmac-sha2-512-etm@openssh.com
      hmac-ripemd160-etm@openssh.com
      hmac-sha1-96-etm@openssh.com
      hmac-md5-96-etm@openssh.com
      hmac-md5
      hmac-sha1
      umac-64@openssh.com
      umac-128@openssh.com
      hmac-sha2-256
      hmac-sha2-512
      hmac-ripemd160
      hmac-ripemd160@openssh.com
      hmac-sha1-96
      hmac-md5-96
  compression_algorithms: (2)
      none
      zlib@openssh.com&lt;/PRE&gt;&lt;/TD&gt;&lt;TD width="203.171875px"&gt;&lt;PRE&gt;hmac-md5-etm@openssh.com
hmac-sha1-etm@openssh.com
umac-64-etm@openssh.com
umac-128-etm@openssh.com
hmac-sha2-256-etm@openssh.com
hmac-sha2-512-etm@openssh.com
hmac-ripemd160-etm@openssh.com
hmac-sha1-96-etm@openssh.com
hmac-md5-96-etm@openssh.com
hmac-md5
hmac-sha1
umac-64@openssh.com
umac-128@openssh.com
hmac-sha2-256
hmac-sha2-512
hmac-ripemd160
hmac-ripemd160@openssh.com
hmac-sha1-96
hmac-md5-96&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;UL&gt;&lt;LI&gt;No max_match=0&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval event="  kex_algorithms: (8)
      curve25519-sha256@libssh.org
      ecdh-sha2-nistp256
      ecdh-sha2-nistp384
      ecdh-sha2-nistp521
      diffie-hellman-group-exchange-sha256
      diffie-hellman-group-exchange-sha1
      diffie-hellman-group14-sha1
      diffie-hellman-group1-sha1
  server_host_key_algorithms: (4)
      ssh-rsa
      ssh-dss
      ecdsa-sha2-nistp256
      ssh-ed25519
  encryption_algorithms: (14)
      aes128-ctr
      aes192-ctr
      aes256-ctr
      arcfour256
      arcfour128
      chacha20-poly1305@openssh.com
      aes128-cbc
      3des-cbc
      blowfish-cbc
      cast128-cbc
      aes192-cbc
      aes256-cbc
      arcfour
      rijndael-cbc@lysator.liu.se
  mac_algorithms: (19)
      hmac-md5-etm@openssh.com
      hmac-sha1-etm@openssh.com
      umac-64-etm@openssh.com
      umac-128-etm@openssh.com
      hmac-sha2-256-etm@openssh.com
      hmac-sha2-512-etm@openssh.com
      hmac-ripemd160-etm@openssh.com
      hmac-sha1-96-etm@openssh.com
      hmac-md5-96-etm@openssh.com
      hmac-md5
      hmac-sha1
      umac-64@openssh.com
      umac-128@openssh.com
      hmac-sha2-256
      hmac-sha2-512
      hmac-ripemd160
      hmac-ripemd160@openssh.com
      hmac-sha1-96
      hmac-md5-96
  compression_algorithms: (2)
      none
      zlib@openssh.com"
``` event simulation above ```

| rex field=event "\b(?&amp;lt;test&amp;gt;[hu]mac-[\w\-\.@]+)"
| eval algocount=mvcount(test)
| table algocount event test​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;TABLE width="791px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="83px"&gt;algocount&lt;/TD&gt;&lt;TD width="503.84375px"&gt;event&lt;/TD&gt;&lt;TD width="203.171875px"&gt;&lt;DIV class=""&gt;test&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="83px"&gt;19&lt;/TD&gt;&lt;TD width="503.84375px"&gt;&lt;PRE&gt;  kex_algorithms: (8)
      curve25519-sha256@libssh.org
      ecdh-sha2-nistp256
      ecdh-sha2-nistp384
      ecdh-sha2-nistp521
      diffie-hellman-group-exchange-sha256
      diffie-hellman-group-exchange-sha1
      diffie-hellman-group14-sha1
      diffie-hellman-group1-sha1
  server_host_key_algorithms: (4)
      ssh-rsa
      ssh-dss
      ecdsa-sha2-nistp256
      ssh-ed25519
  encryption_algorithms: (14)
      aes128-ctr
      aes192-ctr
      aes256-ctr
      arcfour256
      arcfour128
      chacha20-poly1305@openssh.com
      aes128-cbc
      3des-cbc
      blowfish-cbc
      cast128-cbc
      aes192-cbc
      aes256-cbc
      arcfour
      rijndael-cbc@lysator.liu.se
  mac_algorithms: (19)
      hmac-md5-etm@openssh.com
      hmac-sha1-etm@openssh.com
      umac-64-etm@openssh.com
      umac-128-etm@openssh.com
      hmac-sha2-256-etm@openssh.com
      hmac-sha2-512-etm@openssh.com
      hmac-ripemd160-etm@openssh.com
      hmac-sha1-96-etm@openssh.com
      hmac-md5-96-etm@openssh.com
      hmac-md5
      hmac-sha1
      umac-64@openssh.com
      umac-128@openssh.com
      hmac-sha2-256
      hmac-sha2-512
      hmac-ripemd160
      hmac-ripemd160@openssh.com
      hmac-sha1-96
      hmac-md5-96
  compression_algorithms: (2)
      none
      zlib@openssh.com&lt;/PRE&gt;&lt;/TD&gt;&lt;TD width="203.171875px"&gt;&lt;PRE&gt;hmac-md5-etm@openssh.com&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 11 Mar 2022 15:51:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588758#M205037</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-03-11T15:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction with regex for Nmap result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588759#M205038</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/243284"&gt;@bnybln030&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Yes, some of my events contain all 19 MAC algorithms but not all.&amp;nbsp;Some of these algorithms only occur occasionally in other events.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;In that case, max_match=0 is your answer. (See "Optional arguments" in&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Rex#rex" target="_blank" rel="noopener"&gt;rex&lt;/A&gt;.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;You need to post your complete search line; all screenshots only shows the regex portion, but not the complete rex command. (Also, post search line in text; screenshot is not a good way for other people to help.)&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 15:59:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588759#M205038</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-03-11T15:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction with regex for Nmap result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588782#M205045</link>
      <description>&lt;P&gt;You are right, on my screenshot you see the complete search. With "max_match=0" i get the right results:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="test5.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18458iE6F082DBD56F9CFB/image-size/large?v=v2&amp;amp;px=999" role="button" title="test5.png" alt="test5.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If I dont set "max_match=0" then I get exactly the same result as with field extractor:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="test6.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18459iF2A9AF0737DF3B3F/image-size/large?v=v2&amp;amp;px=999" role="button" title="test6.png" alt="test6.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 17:56:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-this-field-with-regex-for-Nmap-result/m-p/588782#M205045</guid>
      <dc:creator>bnybln030</dc:creator>
      <dc:date>2022-03-11T17:56:15Z</dc:date>
    </item>
  </channel>
</rss>

