<?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 match value in events using Rex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-match-value-in-events-using-Rex/m-p/475220#M133591</link>
    <description>&lt;P&gt;Hi experts,&lt;/P&gt;

&lt;P&gt;please help me with regular expression to match the value in each event at search time as shown below &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;:{\"buaid\":{\"business\":[\"12345\"],\"exclude&lt;/STRONG&gt;*&lt;/P&gt;

&lt;P&gt;required output: bss_value=12345&lt;/P&gt;

&lt;P&gt;thanks in advance.&lt;/P&gt;</description>
    <pubDate>Sun, 12 Apr 2020 16:47:14 GMT</pubDate>
    <dc:creator>james_n</dc:creator>
    <dc:date>2020-04-12T16:47:14Z</dc:date>
    <item>
      <title>how to match value in events using Rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-match-value-in-events-using-Rex/m-p/475220#M133591</link>
      <description>&lt;P&gt;Hi experts,&lt;/P&gt;

&lt;P&gt;please help me with regular expression to match the value in each event at search time as shown below &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;:{\"buaid\":{\"business\":[\"12345\"],\"exclude&lt;/STRONG&gt;*&lt;/P&gt;

&lt;P&gt;required output: bss_value=12345&lt;/P&gt;

&lt;P&gt;thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Apr 2020 16:47:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-match-value-in-events-using-Rex/m-p/475220#M133591</guid>
      <dc:creator>james_n</dc:creator>
      <dc:date>2020-04-12T16:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to match value in events using Rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-match-value-in-events-using-Rex/m-p/475221#M133592</link>
      <description>&lt;P&gt;Try &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;business\\":\[\\"(?&amp;lt;bss_value&amp;gt;[^\\]+)\\
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 12 Apr 2020 19:01:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-match-value-in-events-using-Rex/m-p/475221#M133592</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-04-12T19:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: how to match value in events using Rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-match-value-in-events-using-Rex/m-p/475222#M133593</link>
      <description>&lt;P&gt;This might get you close, with a run anywhere example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval _raw=":{\\\"buaid\\\":{\\\"business\\\":[\\\"12345\\\"],\\\"exclude*"
| rex ":{\\\\\"buaid\\\\\":{\\\\\"business\\\\\":\[\\\\\"(?&amp;lt;bss_value&amp;gt;[^\\\]+)\\\\\"\],"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It sets up a &lt;CODE&gt;_raw&lt;/CODE&gt; field, and then extracts from it. The last line should do it for you.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Apr 2020 19:09:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-match-value-in-events-using-Rex/m-p/475222#M133593</guid>
      <dc:creator>jpolvino</dc:creator>
      <dc:date>2020-04-12T19:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: how to match value in events using Rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-match-value-in-events-using-Rex/m-p/475223#M133594</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;|rex "(?&amp;lt;bss_value&amp;gt;\d{5})"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is enough.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Apr 2020 20:38:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-match-value-in-events-using-Rex/m-p/475223#M133594</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-12T20:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to match value in events using Rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-match-value-in-events-using-Rex/m-p/475224#M133595</link>
      <description>&lt;P&gt;Hi @jpolvino , thanks for the answer. its working fine. but if i have multiple values with &lt;CODE&gt;,&lt;/CODE&gt; separated than its not working .Please help on this.&lt;/P&gt;

&lt;P&gt;Ex: &lt;CODE&gt;:{\"buaid\":{\"business\":[\"12345\",\"6789\"]&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 04:24:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-match-value-in-events-using-Rex/m-p/475224#M133595</guid>
      <dc:creator>james_n</dc:creator>
      <dc:date>2020-05-15T04:24:35Z</dc:date>
    </item>
  </channel>
</rss>

