<?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 create search to filter on a field after rex extraction? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-to-filter-on-a-field-after-rex-extraction/m-p/602943#M209852</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I need to create a search that will display results based on a specific value.&lt;BR /&gt;&lt;BR /&gt;My issue is that the following search does not return any result. In penultimate line, when I replace user_ip by index_field1="1.2.3.4" it works and when I remove both last lines I can see user_ip well contains "1.2.3.4"... But index_field1=user_ip does not match, same for index_field2...&lt;BR /&gt;&lt;BR /&gt;index=...&lt;BR /&gt;| eval field1="1.2.3.4:100"&lt;BR /&gt;| rex field=src_ip_port "(?&amp;lt;user_ip&amp;gt;.+)\:(?&amp;lt;user_port&amp;gt;.+)"&lt;BR /&gt;| table user_ip user_port&lt;BR /&gt;| search index_field1=user_ip index_field2=user_port&lt;BR /&gt;| table index_field1 index_field2 user_ip user_port&lt;BR /&gt;&lt;BR /&gt;Thanks by advance for your feedback.&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jun 2022 19:19:58 GMT</pubDate>
    <dc:creator>yanisA</dc:creator>
    <dc:date>2022-06-23T19:19:58Z</dc:date>
    <item>
      <title>How to create search to filter on a field after rex extraction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-to-filter-on-a-field-after-rex-extraction/m-p/602943#M209852</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I need to create a search that will display results based on a specific value.&lt;BR /&gt;&lt;BR /&gt;My issue is that the following search does not return any result. In penultimate line, when I replace user_ip by index_field1="1.2.3.4" it works and when I remove both last lines I can see user_ip well contains "1.2.3.4"... But index_field1=user_ip does not match, same for index_field2...&lt;BR /&gt;&lt;BR /&gt;index=...&lt;BR /&gt;| eval field1="1.2.3.4:100"&lt;BR /&gt;| rex field=src_ip_port "(?&amp;lt;user_ip&amp;gt;.+)\:(?&amp;lt;user_port&amp;gt;.+)"&lt;BR /&gt;| table user_ip user_port&lt;BR /&gt;| search index_field1=user_ip index_field2=user_port&lt;BR /&gt;| table index_field1 index_field2 user_ip user_port&lt;BR /&gt;&lt;BR /&gt;Thanks by advance for your feedback.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2022 19:19:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-to-filter-on-a-field-after-rex-extraction/m-p/602943#M209852</guid>
      <dc:creator>yanisA</dc:creator>
      <dc:date>2022-06-23T19:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: Search : Filter on a field after rex extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-to-filter-on-a-field-after-rex-extraction/m-p/603011#M209865</link>
      <description>&lt;P&gt;The search command cannot accept a field name on both sides of the =.&amp;nbsp; Use where, instead.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=...
| eval field1="1.2.3.4:100"
| rex field=src_ip_port "(?&amp;lt;user_ip&amp;gt;.+)\:(?&amp;lt;user_port&amp;gt;.+)"
| table user_ip user_port
| where (index_field1=user_ip AND index_field2=user_port)
| table index_field1 index_field2 user_ip user_port&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 23 Jun 2022 13:07:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-to-filter-on-a-field-after-rex-extraction/m-p/603011#M209865</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-06-23T13:07:57Z</dc:date>
    </item>
  </channel>
</rss>

