<?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: Using rex to find matching values. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-rex-to-find-matching-values/m-p/313995#M93970</link>
    <description>&lt;P&gt;Hi veera9,&lt;BR /&gt;
Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ACTION\s:\[\d\]\s\'(?&amp;lt;ACTION&amp;gt;[^\']*)\'\s+DATABASE\[\d+\]\s\'(?&amp;lt;DATABASE&amp;gt;[^\']*)\'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can test it at &lt;A href="https://regex101.com/r/2BwU4O/1"&gt;https://regex101.com/r/2BwU4O/1&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Thu, 31 Aug 2017 14:00:43 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2017-08-31T14:00:43Z</dc:date>
    <item>
      <title>Using rex to find matching values.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-rex-to-find-matching-values/m-p/313994#M93969</link>
      <description>&lt;P&gt;I have the following&lt;BR /&gt;
ACTION :[7] 'CONNECT'&lt;BR /&gt;
DATABASE[1]   'SYSTEM'&lt;/P&gt;

&lt;P&gt;That's in the _raw data.&lt;BR /&gt;
How do I extract CONNECT and SYSTEM under headers ACTION and DATABASE?&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2017 13:33:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-rex-to-find-matching-values/m-p/313994#M93969</guid>
      <dc:creator>veera9</dc:creator>
      <dc:date>2017-08-31T13:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using rex to find matching values.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-rex-to-find-matching-values/m-p/313995#M93970</link>
      <description>&lt;P&gt;Hi veera9,&lt;BR /&gt;
Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ACTION\s:\[\d\]\s\'(?&amp;lt;ACTION&amp;gt;[^\']*)\'\s+DATABASE\[\d+\]\s\'(?&amp;lt;DATABASE&amp;gt;[^\']*)\'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can test it at &lt;A href="https://regex101.com/r/2BwU4O/1"&gt;https://regex101.com/r/2BwU4O/1&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2017 14:00:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-rex-to-find-matching-values/m-p/313995#M93970</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-08-31T14:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using rex to find matching values.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-rex-to-find-matching-values/m-p/313996#M93971</link>
      <description>&lt;P&gt;That would be &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | rex "ACTION\s:\[\d\]\s\'(?&amp;lt;ACTION&amp;gt;[^\']*)\'\s+DATABASE\[\d+\]\s\'(?&amp;lt;DATABASE&amp;gt;[^\']*)\'"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The above works fine.  Based on your example breaking across lines, I might go with &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | rex "ACTION\s:\[\d\]\s\'(?&amp;lt;ACTION&amp;gt;[^\']*)\'"
 | rex "DATABASE\[\d+\]\s\'(?&amp;lt;DATABASE&amp;gt;[^\']*)\'"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...or...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | rex "ACTION\s:\[\d\]\s\'(?&amp;lt;ACTION&amp;gt;[^\']*)\'|DATABASE\[\d+\]\s\'(?&amp;lt;DATABASE&amp;gt;[^\']*)\'" max_match=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any of the above should work.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2017 23:56:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-rex-to-find-matching-values/m-p/313996#M93971</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-08-31T23:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: Using rex to find matching values.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-rex-to-find-matching-values/m-p/313997#M93972</link>
      <description>&lt;P&gt;Thank you everyone.&lt;/P&gt;</description>
      <pubDate>Sun, 24 Sep 2017 00:39:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-rex-to-find-matching-values/m-p/313997#M93972</guid>
      <dc:creator>veera9</dc:creator>
      <dc:date>2017-09-24T00:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using rex to find matching values.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-rex-to-find-matching-values/m-p/313998#M93973</link>
      <description>&lt;P&gt;If you're satisfied, please accept or upvote this answer.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Sun, 24 Sep 2017 07:59:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-rex-to-find-matching-values/m-p/313998#M93973</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-09-24T07:59:24Z</dc:date>
    </item>
  </channel>
</rss>

