<?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 to extract 2 fields using rex? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-2-fields-using-rex/m-p/578080#M201468</link>
    <description>&lt;P&gt;Hi, I am new to SPL and have figured out how to do one rex Field extract - like this&lt;/P&gt;
&lt;P&gt;index=xxxxx&amp;nbsp; "PUT /app/1/projects" | rex field=_raw "HTTP\/1\.1\" (?P&amp;lt;Status_Code&amp;gt;[^\ ]*)"&lt;/P&gt;
&lt;P&gt;this is from the following search results log line&amp;nbsp;&lt;SPAN class=""&gt;HTTP&lt;/SPAN&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;SPAN class=""&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;1"&lt;/SPAN&gt; &lt;SPAN class=""&gt;200&lt;/SPAN&gt; &lt;SPAN class=""&gt;44&lt;/SPAN&gt; &lt;SPAN class=""&gt;188&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;This gives me the Status code and I can sort them and report - example 200 , 201, 400 or 500&lt;/P&gt;
&lt;P&gt;I need to use the last field (2 or 3) digits to get the speed - how would I do that - I am stuck with formatting&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
    <pubDate>Mon, 14 Mar 2022 18:30:41 GMT</pubDate>
    <dc:creator>LizAndy123</dc:creator>
    <dc:date>2022-03-14T18:30:41Z</dc:date>
    <item>
      <title>How to extract 2 fields using rex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-2-fields-using-rex/m-p/578080#M201468</link>
      <description>&lt;P&gt;Hi, I am new to SPL and have figured out how to do one rex Field extract - like this&lt;/P&gt;
&lt;P&gt;index=xxxxx&amp;nbsp; "PUT /app/1/projects" | rex field=_raw "HTTP\/1\.1\" (?P&amp;lt;Status_Code&amp;gt;[^\ ]*)"&lt;/P&gt;
&lt;P&gt;this is from the following search results log line&amp;nbsp;&lt;SPAN class=""&gt;HTTP&lt;/SPAN&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;SPAN class=""&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;1"&lt;/SPAN&gt; &lt;SPAN class=""&gt;200&lt;/SPAN&gt; &lt;SPAN class=""&gt;44&lt;/SPAN&gt; &lt;SPAN class=""&gt;188&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;This gives me the Status code and I can sort them and report - example 200 , 201, 400 or 500&lt;/P&gt;
&lt;P&gt;I need to use the last field (2 or 3) digits to get the speed - how would I do that - I am stuck with formatting&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 18:30:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-2-fields-using-rex/m-p/578080#M201468</guid>
      <dc:creator>LizAndy123</dc:creator>
      <dc:date>2022-03-14T18:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting 2 fields using rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-2-fields-using-rex/m-p/578086#M201472</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;this is from the following search results log line&amp;nbsp;&lt;SPAN class=""&gt;HTTP&lt;/SPAN&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;SPAN class=""&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;1"&lt;/SPAN&gt; &lt;SPAN class=""&gt;200&lt;/SPAN&gt; &lt;SPAN class=""&gt;44&lt;/SPAN&gt; &lt;SPAN class=""&gt;188&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;How about&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "HTTP/1.1\"\s+(?&amp;lt;Status_Code&amp;gt;\d+)\s+(?&amp;lt;field2&amp;gt;\d+)\s+(?&amp;lt;field3&amp;gt;\d+)"&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:35:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-2-fields-using-rex/m-p/578086#M201472</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2021-12-10T21:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting 2 fields using rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-2-fields-using-rex/m-p/578087#M201473</link>
      <description>&lt;LI-CODE lang="markup"&gt;| rex "HTTP\/\d\.\d\"\s(?&amp;lt;Status_Code&amp;gt;\d+).*?(?&amp;lt;speed&amp;gt;\d+)$"&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:35:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-2-fields-using-rex/m-p/578087#M201473</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-12-10T21:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting 2 fields using rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-2-fields-using-rex/m-p/588974#M205111</link>
      <description>&lt;P&gt;Thanks this worked - I never came back on to say&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 18:03:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-2-fields-using-rex/m-p/588974#M205111</guid>
      <dc:creator>LizAndy123</dc:creator>
      <dc:date>2022-03-14T18:03:09Z</dc:date>
    </item>
  </channel>
</rss>

