<?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: Filter a Search by Field Value, using Rex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Filter-a-Search-by-Field-Value-using-Rex/m-p/199425#M57752</link>
    <description>&lt;P&gt;Aha Its the &lt;CODE&gt;search&lt;/CODE&gt; command I was looking for, thanks @martin_mueller &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;</description>
    <pubDate>Thu, 03 Aug 2017 14:19:59 GMT</pubDate>
    <dc:creator>chimmi04</dc:creator>
    <dc:date>2017-08-03T14:19:59Z</dc:date>
    <item>
      <title>Filter a Search by Field Value, using Rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filter-a-Search-by-Field-Value-using-Rex/m-p/199423#M57750</link>
      <description>&lt;P&gt;Hi, I'm looking for a way to run one summary index search on all files of the same sourcetype, and then identify individual files by defining characteristics.  For example, a sample log output is:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;222    Mon Jun 16 07:00:47 EDT 2014    13384426    2   PS MarkSweep    0   0.0 0   0.0         519045120   524288000   519045120   119919880&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;and I know that every log from this file will contain either "PS MarkSweep" or "PS Scavenge" in the same position, which in this case is rex field &lt;CODE&gt;| rex "(?i)^(?:[^ ]* ){5}\\d+\\t\\d+\\t\\d+\\t(?P&amp;lt;FIELDNAME&amp;gt;[^\\t]+)" |&lt;/CODE&gt;.  How can I run the search returning results only where FIELDNAME is  "PS MarkSweep" or "PS Scavenge"?  Thank you!!&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jun 2014 14:27:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filter-a-Search-by-Field-Value-using-Rex/m-p/199423#M57750</guid>
      <dc:creator>ctallarico20</dc:creator>
      <dc:date>2014-06-17T14:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a Search by Field Value, using Rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filter-a-Search-by-Field-Value-using-Rex/m-p/199424#M57751</link>
      <description>&lt;P&gt;Not sure if I understand the question correctly, but I'd do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;PS MarkSweep OR Scavenge | rex "(?i)^(?:[^ ]* ){5}\\d+\\t\\d+\\t\\d+\\t(?P&amp;lt;FIELDNAME&amp;gt;[^\\t]+)" | search FIELDNAME="PS MarkSweep" OR FIELDNAME="PS Scavenge"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note, the bit in the front is for performance gain - that way Splunk will only load events off disk if they contain those words. Consider adding the field extraction to the sourcetype in props.conf.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jun 2014 15:30:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filter-a-Search-by-Field-Value-using-Rex/m-p/199424#M57751</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-06-17T15:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a Search by Field Value, using Rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filter-a-Search-by-Field-Value-using-Rex/m-p/199425#M57752</link>
      <description>&lt;P&gt;Aha Its the &lt;CODE&gt;search&lt;/CODE&gt; command I was looking for, thanks @martin_mueller &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2017 14:19:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filter-a-Search-by-Field-Value-using-Rex/m-p/199425#M57752</guid>
      <dc:creator>chimmi04</dc:creator>
      <dc:date>2017-08-03T14:19:59Z</dc:date>
    </item>
  </channel>
</rss>

