<?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 extract values inside of the {}? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-values-inside-of-the/m-p/617872#M214734</link>
    <description>&lt;P&gt;Hello Splunk Ninjas!&lt;/P&gt;
&lt;P&gt;I will require your assistance with designing my regex expression.&lt;/P&gt;
&lt;P&gt;I need to filter for the value of Message in this sample log line:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;2022-09-23T13:20:25.765+01:00 [29] WARN Core.ErrorResponse - {} - Error message being sent to user with Http Status code: BadRequest:
{"Details":{"field1":value,"field2":"value2"},"Message":"This is the message.","UserMessage":null,"Code":86,"Explanation":null,"Resolution":null,"Category":4}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will be interested in extracting value of field1, field2 (inside of {Details}, message and code,&lt;/P&gt;
&lt;P&gt;Any help, much appreciated!&lt;/P&gt;
&lt;P&gt;Thanks again&lt;/P&gt;</description>
    <pubDate>Thu, 20 Oct 2022 17:51:23 GMT</pubDate>
    <dc:creator>napoleon182</dc:creator>
    <dc:date>2022-10-20T17:51:23Z</dc:date>
    <item>
      <title>How to extract values inside of the {}?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-values-inside-of-the/m-p/617872#M214734</link>
      <description>&lt;P&gt;Hello Splunk Ninjas!&lt;/P&gt;
&lt;P&gt;I will require your assistance with designing my regex expression.&lt;/P&gt;
&lt;P&gt;I need to filter for the value of Message in this sample log line:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;2022-09-23T13:20:25.765+01:00 [29] WARN Core.ErrorResponse - {} - Error message being sent to user with Http Status code: BadRequest:
{"Details":{"field1":value,"field2":"value2"},"Message":"This is the message.","UserMessage":null,"Code":86,"Explanation":null,"Resolution":null,"Category":4}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will be interested in extracting value of field1, field2 (inside of {Details}, message and code,&lt;/P&gt;
&lt;P&gt;Any help, much appreciated!&lt;/P&gt;
&lt;P&gt;Thanks again&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 17:51:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-values-inside-of-the/m-p/617872#M214734</guid>
      <dc:creator>napoleon182</dc:creator>
      <dc:date>2022-10-20T17:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Regex to extract values inside of the {}</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-values-inside-of-the/m-p/617874#M214736</link>
      <description>&lt;P&gt;i&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/249766"&gt;@napoleon182&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;this seems to be a json format, did you tried with spath command (&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Spath)?" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Spath)?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 15:18:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-values-inside-of-the/m-p/617874#M214736</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-10-20T15:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Regex to extract values inside of the {}</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-values-inside-of-the/m-p/617877#M214739</link>
      <description>&lt;P&gt;This is fairly simple, but I suspect you are struggling to extract all fields with a single regex.&amp;nbsp; Don't worry about that.&amp;nbsp; Using multiple rex commands is much easier and has little performance penalty.&amp;nbsp; A complex regex that extracts all fields in one go may be less performant.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "Message\\\":\\\"(?&amp;lt;Message&amp;gt;[^\\\"]+)"
| rex "field1\\\":\\\"(?&amp;lt;field1&amp;gt;[^\\\"]+)"
| rex "field2\\\":\\\"(?&amp;lt;field2&amp;gt;[^\\\"]+)"
| rex "Code\\\":(?&amp;lt;Code&amp;gt;\d+)"&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 20 Oct 2022 15:23:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-values-inside-of-the/m-p/617877#M214739</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-10-20T15:23:54Z</dc:date>
    </item>
  </channel>
</rss>

