<?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 Fetch the data from the fields which has 2 words in the field name using regular expression? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Fetch-the-data-from-the-fields-which-has-2-words-in-the-field/m-p/461703#M130197</link>
    <description>&lt;P&gt;I have an event as below:&lt;/P&gt;

&lt;P&gt;Mar 30 16:59:08 vg1 : %ASA-4-113019: Group = EMPLOYEE, Username = roys86, IP = &lt;STRONG&gt;.&lt;/STRONG&gt;&lt;EM&gt;.&lt;/EM&gt;&lt;EM&gt;.&lt;/EM&gt;**, Session disconnected. Session Type: SSL, Duration: 7h:18m:21s, Bytes xmt: 408659006, Bytes rcv: 162000348, Reason: User Requested&lt;/P&gt;

&lt;P&gt;Now, I would like to fetch the values for the fields Session Type, Duration, Bytes xmt, Bytes rcv, Reason&lt;/P&gt;

&lt;P&gt;I would also like to rename some the fields after fetching the data. Thanks in advance!!&lt;/P&gt;</description>
    <pubDate>Tue, 31 Mar 2020 00:48:57 GMT</pubDate>
    <dc:creator>khojas02</dc:creator>
    <dc:date>2020-03-31T00:48:57Z</dc:date>
    <item>
      <title>Fetch the data from the fields which has 2 words in the field name using regular expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Fetch-the-data-from-the-fields-which-has-2-words-in-the-field/m-p/461703#M130197</link>
      <description>&lt;P&gt;I have an event as below:&lt;/P&gt;

&lt;P&gt;Mar 30 16:59:08 vg1 : %ASA-4-113019: Group = EMPLOYEE, Username = roys86, IP = &lt;STRONG&gt;.&lt;/STRONG&gt;&lt;EM&gt;.&lt;/EM&gt;&lt;EM&gt;.&lt;/EM&gt;**, Session disconnected. Session Type: SSL, Duration: 7h:18m:21s, Bytes xmt: 408659006, Bytes rcv: 162000348, Reason: User Requested&lt;/P&gt;

&lt;P&gt;Now, I would like to fetch the values for the fields Session Type, Duration, Bytes xmt, Bytes rcv, Reason&lt;/P&gt;

&lt;P&gt;I would also like to rename some the fields after fetching the data. Thanks in advance!!&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 00:48:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Fetch-the-data-from-the-fields-which-has-2-words-in-the-field/m-p/461703#M130197</guid>
      <dc:creator>khojas02</dc:creator>
      <dc:date>2020-03-31T00:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch the data from the fields which has 2 words in the field name using regular expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Fetch-the-data-from-the-fields-which-has-2-words-in-the-field/m-p/461704#M130198</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex "Session\sType:\s*(?&amp;lt;session_type&amp;gt;\S+),\s+Duration:\s*(?&amp;lt;duration&amp;gt;\S+),\s*Bytes xmt:\s*(?&amp;lt;bytes_xmt&amp;gt;\d+),\s*Bytes rcv:\s*(?&amp;lt;bytes_rcv&amp;gt;\d+),\s*Reason:\s*(?&amp;lt;reason&amp;gt;.*)" ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 31 Mar 2020 02:01:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Fetch-the-data-from-the-fields-which-has-2-words-in-the-field/m-p/461704#M130198</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2020-03-31T02:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch the data from the fields which has 2 words in the field name using regular expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Fetch-the-data-from-the-fields-which-has-2-words-in-the-field/m-p/461705#M130199</link>
      <description>&lt;P&gt;Thank you for your response. This has worked for  me, however my events got changed now as below:&lt;/P&gt;

&lt;P&gt;Mar 31 13:21:29 vg1 : %ASA-4-113019: Group = EMPLOYEE, Username = VAZQUD68, IP = 162.228.72.102, Session disconnected. Session Type: SSL, Duration: 1h:06m:28s, Bytes xmt: 17586992, Bytes rcv: 6595282, Reason: Idle Timeout&lt;/P&gt;

&lt;P&gt;Can you help me fetch the valules for Group, Username, IP, Session Type, Duration, Bytes xmt, Bytes rcv, Reason? Also, I would like to fetch "vg1" value that can go into the column name "Host".&lt;/P&gt;

&lt;P&gt;Thanks in advance!!&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 20:35:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Fetch-the-data-from-the-fields-which-has-2-words-in-the-field/m-p/461705#M130199</guid>
      <dc:creator>khojas02</dc:creator>
      <dc:date>2020-03-31T20:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch the data from the fields which has 2 words in the field name using regular expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Fetch-the-data-from-the-fields-which-has-2-words-in-the-field/m-p/461706#M130200</link>
      <description>&lt;P&gt;Te pattern in my answer is very easy to extend; give it a try and you will learn something!&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 20:57:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Fetch-the-data-from-the-fields-which-has-2-words-in-the-field/m-p/461706#M130200</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2020-03-31T20:57:53Z</dc:date>
    </item>
  </channel>
</rss>

