<?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 Regex - How to extract multiple words? in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/Regex-How-to-extract-multiple-words/m-p/614500#M11628</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if I had logs as such:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"Client authentication successful PAN-OS ver: 9.1.11-h3 Panorama ver:10.1.6-h3 Client IP: 10.68.196.211 Server IP: 10.58.217.123 Client CN: 013101004861" &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"Client authentication successful PAN-OS ver: 9.1.11 Panorama ver:10.1.6-h6 Client IP: 10.58.90.53 Server IP: 10.58.90.200 Client CN: 010401005346", &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;How can I extract BOTH the PAN-OS and Panorma ver, i.e, 9.1.11, 10.1.6-h6, 10.1.6-h3, 9.1.11-h3???? &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I tried the following but it doesn't work - | rex field=body "[Panorama][PAN-OS]\s*:(?&amp;lt;Software_Version&amp;gt;.+?) Client"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Can you please help?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Sep 2022 15:33:10 GMT</pubDate>
    <dc:creator>POR160893</dc:creator>
    <dc:date>2022-09-26T15:33:10Z</dc:date>
    <item>
      <title>Regex - How to extract multiple words?</title>
      <link>https://community.splunk.com/t5/Reporting/Regex-How-to-extract-multiple-words/m-p/614500#M11628</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if I had logs as such:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"Client authentication successful PAN-OS ver: 9.1.11-h3 Panorama ver:10.1.6-h3 Client IP: 10.68.196.211 Server IP: 10.58.217.123 Client CN: 013101004861" &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"Client authentication successful PAN-OS ver: 9.1.11 Panorama ver:10.1.6-h6 Client IP: 10.58.90.53 Server IP: 10.58.90.200 Client CN: 010401005346", &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;How can I extract BOTH the PAN-OS and Panorma ver, i.e, 9.1.11, 10.1.6-h6, 10.1.6-h3, 9.1.11-h3???? &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I tried the following but it doesn't work - | rex field=body "[Panorama][PAN-OS]\s*:(?&amp;lt;Software_Version&amp;gt;.+?) Client"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Can you please help?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 15:33:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Regex-How-to-extract-multiple-words/m-p/614500#M11628</guid>
      <dc:creator>POR160893</dc:creator>
      <dc:date>2022-09-26T15:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: Regex - Multiple words to extract</title>
      <link>https://community.splunk.com/t5/Reporting/Regex-How-to-extract-multiple-words/m-p/614501#M11629</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;regex101.com is your friend.&amp;nbsp;&lt;A href="https://regex101.com/r/MgVexD/1" target="_blank"&gt;https://regex101.com/r/MgVexD/1&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;...
| rex field=body "PAN-OS ver:\s*(?&amp;lt;PAN_OS_VER&amp;gt;[^ ]+)\s+Panorama ver:(?&amp;lt;Software_Version&amp;gt;[^ ]+)"&lt;/LI-CODE&gt;&lt;P&gt;r. Ismo&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 08:06:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Regex-How-to-extract-multiple-words/m-p/614501#M11629</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2022-09-26T08:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: Regex - Multiple words to extract</title>
      <link>https://community.splunk.com/t5/Reporting/Regex-How-to-extract-multiple-words/m-p/614503#M11630</link>
      <description>&lt;P&gt;No fields got extracted with this Regex. Also, the 2 extracted version needed to be stored in a single field .... so using 2 fields,&amp;nbsp;&amp;lt;PAN_OS_VER&amp;gt; and&amp;nbsp;&amp;lt;Software_Version&amp;gt; doe not concatenate both fields into 1 field.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 08:12:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Regex-How-to-extract-multiple-words/m-p/614503#M11630</guid>
      <dc:creator>POR160893</dc:creator>
      <dc:date>2022-09-26T08:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Regex - Multiple words to extract</title>
      <link>https://community.splunk.com/t5/Reporting/Regex-How-to-extract-multiple-words/m-p/614505#M11631</link>
      <description>&lt;P&gt;If you want both in the same field use:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;| rex field=body max_match=0 "(PAN-OS ver|Panorama ver):(?&amp;lt;Software_Version&amp;gt;[^\s]+)"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If you want both in a separate field use:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;| rex field=body "PAN-OS ver:(?&amp;lt;PAN_OS_Version&amp;gt;[^\s]+).+?Panorama ver:(?&amp;lt;Panorama_Version&amp;gt;[^\s]+)"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I hope this helps!&lt;/P&gt;&lt;P&gt;_______________________________________&lt;/P&gt;&lt;P&gt;If this was helpful please consider awarding Karma. Thx!&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 08:16:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Regex-How-to-extract-multiple-words/m-p/614505#M11631</guid>
      <dc:creator>FelixLeh</dc:creator>
      <dc:date>2022-09-26T08:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Regex - Multiple words to extract</title>
      <link>https://community.splunk.com/t5/Reporting/Regex-How-to-extract-multiple-words/m-p/614507#M11632</link>
      <description>&lt;P&gt;If your example data is valid then this regex extracts those as you can verify with this regex101.com link. If this didn't work with splunk then please give us a correct event data.&lt;/P&gt;&lt;P&gt;You can combine those to one field e.g.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;...
| eval Software_Version = "PAN-VERSION: " . PAN_OS_VER . "  " . Software_Version
| fields - PAN_OS_VER&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 08:19:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Regex-How-to-extract-multiple-words/m-p/614507#M11632</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2022-09-26T08:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: Regex - Multiple words to extract</title>
      <link>https://community.splunk.com/t5/Reporting/Regex-How-to-extract-multiple-words/m-p/614508#M11633</link>
      <description>&lt;P&gt;Are you sure the field you want to extract from is called body? If you want to extract from the event itself and not a specific field use:&lt;BR /&gt;&lt;STRONG&gt;| rex field=_raw&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 08:21:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Regex-How-to-extract-multiple-words/m-p/614508#M11633</guid>
      <dc:creator>FelixLeh</dc:creator>
      <dc:date>2022-09-26T08:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Regex - Multiple words to extract</title>
      <link>https://community.splunk.com/t5/Reporting/Regex-How-to-extract-multiple-words/m-p/614510#M11634</link>
      <description>&lt;P&gt;Worked perfectly. Thank you and I obviously gave you Karma&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 08:38:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Regex-How-to-extract-multiple-words/m-p/614510#M11634</guid>
      <dc:creator>POR160893</dc:creator>
      <dc:date>2022-09-26T08:38:18Z</dc:date>
    </item>
  </channel>
</rss>

