<?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: How to match partial values of field a with partial values of field b ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-match-partial-values-of-field-a-with-partial-values-of/m-p/656458#M226738</link>
    <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/237678"&gt;@innoce&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Sep 2023 16:56:09 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2023-09-01T16:56:09Z</dc:date>
    <item>
      <title>How to match partial values of field a with partial values of field b ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-match-partial-values-of-field-a-with-partial-values-of/m-p/656048#M226585</link>
      <description>&lt;P&gt;Hi, I want to match partial values of field a with partial values of field b.. I tried with match/like but no luck..&lt;BR /&gt;&lt;BR /&gt;field a&lt;BR /&gt;AA\ABC$&lt;BR /&gt;BB\DCE$&lt;BR /&gt;&lt;BR /&gt;field b&lt;BR /&gt;&lt;SPAN&gt;A=ABC,B=Domain,C=AB,D=XXX,E=NET&lt;BR /&gt;A=DCE,B=Domain,C=AB,D=XXX,E=NET&lt;BR /&gt;&lt;BR /&gt;Now my results should return&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;field a = field b&lt;BR /&gt;ABC&amp;nbsp; &amp;nbsp; = ABC&lt;BR /&gt;DCE&amp;nbsp; &amp;nbsp; = DCE&lt;BR /&gt;&lt;BR /&gt;Could someone pls help me on this?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 05:26:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-match-partial-values-of-field-a-with-partial-values-of/m-p/656048#M226585</guid>
      <dc:creator>innoce</dc:creator>
      <dc:date>2023-08-30T05:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to match partial values of field a with partial values of field b ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-match-partial-values-of-field-a-with-partial-values-of/m-p/656053#M226589</link>
      <description>&lt;P&gt;Are you looking for any length partial match of field a with b?&lt;/P&gt;&lt;P&gt;i.e. if field a is&amp;nbsp;&lt;SPAN&gt;AA\ABC$&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;and field B is 123456789A987654321&lt;/P&gt;&lt;P&gt;do you want a match because it contains A? which is a partial match?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 05:59:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-match-partial-values-of-field-a-with-partial-values-of/m-p/656053#M226589</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-08-30T05:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to match partial values of field a with partial values of field b ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-match-partial-values-of-field-a-with-partial-values-of/m-p/656054#M226590</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;, nope.. let me share the exact example values&lt;BR /&gt;&lt;BR /&gt;field a = &lt;STRONG&gt;AAAAA\ABCDE-SS410009&lt;/STRONG&gt;$&lt;/P&gt;&lt;P&gt;field b = A=&lt;STRONG&gt;AAAAA\ABCDE-SS410009&lt;/STRONG&gt;,&lt;SPAN&gt;B=Domain,C=AB,D=XXX,E=NET&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Now I want to match&amp;nbsp;&lt;BR /&gt;field a= AAAAA\ABCDE-SS410009&lt;BR /&gt;field b=&amp;nbsp;AAAAA\ABCDE-SS410009&lt;BR /&gt;like this&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 07:04:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-match-partial-values-of-field-a-with-partial-values-of/m-p/656054#M226590</guid>
      <dc:creator>innoce</dc:creator>
      <dc:date>2023-08-30T07:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to match partial values of field a with partial values of field b ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-match-partial-values-of-field-a-with-partial-values-of/m-p/656062#M226594</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/237678"&gt;@innoce&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;as&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;said, you have to extract the second value from the second field.&lt;/P&gt;&lt;P&gt;Are you sure about the position of the second value in the second field?&lt;/P&gt;&lt;P&gt;if it's alway after "A=" and always in the beginning of the field, you could use the following regex:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| rex field=b "^A\=(?&amp;lt;A&amp;gt;[^,]*)"
| where a=A&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/9hePOP/1" target="_blank"&gt;https://regex101.com/r/9hePOP/1&lt;/A&gt;&amp;nbsp;othrwise you have to modify the regex but using the same approach.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 08:30:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-match-partial-values-of-field-a-with-partial-values-of/m-p/656062#M226594</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-08-30T08:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to match partial values of field a with partial values of field b ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-match-partial-values-of-field-a-with-partial-values-of/m-p/656169#M226635</link>
      <description>&lt;P&gt;Sorry, still not sure I get it, you say partial matches of both A and B, so for your second example what are the rules there?&lt;/P&gt;&lt;BLOCKQUOTE&gt;field a = &lt;STRONG&gt;AAAAA\ABCDE-SS410009&lt;/STRONG&gt;$&lt;P&gt;field b = A=&lt;STRONG&gt;AAAAA\ABCDE-SS410009&lt;/STRONG&gt;,&lt;SPAN&gt;B=Domain,C=AB,D=XXX,E=NET&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Now I want to match&amp;nbsp;&lt;BR /&gt;field a= AAAAA\ABCDE-SS410009&lt;BR /&gt;field b=&amp;nbsp;AAAAA\ABCDE-SS410009&lt;BR /&gt;like this&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;In the above, you show that all characters up to and&amp;nbsp;&lt;STRONG&gt;excluding&lt;/STRONG&gt; the final $ sign are found in B, so you appear to be showing the longest match of A found in B.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;So, if A had&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AAAAA\ABCDE-PP921234&lt;/STRONG&gt;$&lt;/P&gt;&lt;P&gt;would you expect to see&amp;nbsp;&lt;STRONG&gt;AAAAA\ABCDE&lt;/STRONG&gt; as a match result&lt;/P&gt;&lt;P&gt;and if A had&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BBBBB\ABCDE-SS410009&lt;/STRONG&gt;$&lt;/P&gt;&lt;P&gt;would you expect to see&amp;nbsp;&lt;STRONG&gt;ABCDE-SS410009&lt;/STRONG&gt;&amp;nbsp;as a match&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also is the&amp;nbsp;&lt;STRONG&gt;A=&lt;/STRONG&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;part in B related to field 'a'?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 22:59:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-match-partial-values-of-field-a-with-partial-values-of/m-p/656169#M226635</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-08-30T22:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to match partial values of field a with partial values of field b ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-match-partial-values-of-field-a-with-partial-values-of/m-p/656199#M226647</link>
      <description>&lt;P&gt;Looks like there is also a trailing "$" in field a.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| rex field=b "^A\=(?&amp;lt;A&amp;gt;[^,]*)"
| where a=A."$"&lt;/LI-CODE&gt;&lt;P&gt;Something like that.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 06:53:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-match-partial-values-of-field-a-with-partial-values-of/m-p/656199#M226647</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-08-31T06:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to match partial values of field a with partial values of field b ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-match-partial-values-of-field-a-with-partial-values-of/m-p/656282#M226680</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;, Thanks for the headsup.. as said, I modified the regex..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "fieldb=(?P&amp;lt;fieldb&amp;gt;\w*[\-|\_]\w*)\,"
| rex "fielda\:\s+(?P&amp;lt;fielda_X&amp;gt;\w*\-\w*)\$"
and used the where condition to find matches
| where 'fielda_X'='fieldb'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Its working now as expected..&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 14:57:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-match-partial-values-of-field-a-with-partial-values-of/m-p/656282#M226680</guid>
      <dc:creator>innoce</dc:creator>
      <dc:date>2023-08-31T14:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to match partial values of field a with partial values of field b ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-match-partial-values-of-field-a-with-partial-values-of/m-p/656337#M226695</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/237678"&gt;@innoce&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You don't need quotes id in the field names there isn't any space or special char.&lt;/P&gt;&lt;P&gt;Anyway,&amp;nbsp;good for you, see next time!&lt;/P&gt;&lt;P&gt;let us know if we can help you more, or, please, accept one answer for the other people of Community.&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 21:28:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-match-partial-values-of-field-a-with-partial-values-of/m-p/656337#M226695</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-08-31T21:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to match partial values of field a with partial values of field b ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-match-partial-values-of-field-a-with-partial-values-of/m-p/656458#M226738</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/237678"&gt;@innoce&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2023 16:56:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-match-partial-values-of-field-a-with-partial-values-of/m-p/656458#M226738</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-09-01T16:56:09Z</dc:date>
    </item>
  </channel>
</rss>

