<?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: Extract Field with Backslash and Quotes in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extract-Field-with-Backslash-and-Quotes/m-p/540943#M153106</link>
    <description>&lt;P&gt;your log is JSON, try &lt;STRONG&gt;spath&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Feb 2021 01:38:25 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2021-02-23T01:38:25Z</dc:date>
    <item>
      <title>Extract Field with Backslash and Quotes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Field-with-Backslash-and-Quotes/m-p/540445#M152897</link>
      <description>&lt;P&gt;I'm trying to extract this field that has colon, backslash and quotes around it and its not yielding any result.&lt;/P&gt;&lt;P&gt;Field looks like this:&amp;nbsp;&lt;SPAN&gt;[{&lt;/SPAN&gt;&lt;SPAN class="t"&gt;\&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class="t"&gt;errorCode\&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class="t"&gt;:9810&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is what I tried:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;index=main errorCode | rex field=_raw&amp;nbsp; "\"errorCode\\\":(?&amp;lt;code&amp;gt;....)" | table code&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is giving empty result.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Would appreciate any hints or suggestions.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2021 21:58:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Field-with-Backslash-and-Quotes/m-p/540445#M152897</guid>
      <dc:creator>ank15july96</dc:creator>
      <dc:date>2021-02-18T21:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Field with Backslash and Quotes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Field-with-Backslash-and-Quotes/m-p/540448#M152900</link>
      <description>&lt;P&gt;This may help..&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;index=main errorCode |&amp;nbsp;rex field=_raw "errorCode\\\\\":(?&amp;lt;code&amp;gt;\d+)" | table code&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2021 22:35:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Field-with-Backslash-and-Quotes/m-p/540448#M152900</guid>
      <dc:creator>saravanan90</dc:creator>
      <dc:date>2021-02-18T22:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Field with Backslash and Quotes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Field-with-Backslash-and-Quotes/m-p/540912#M153090</link>
      <description>&lt;P&gt;Hey Saravanan, do you know how to extract second occurrence of errorCode?&lt;BR /&gt;This query is extracting the first occurrence fine but I need to skip the first and retrieve the second occurrence.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 21:05:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Field-with-Backslash-and-Quotes/m-p/540912#M153090</guid>
      <dc:creator>ank15july96</dc:creator>
      <dc:date>2021-02-22T21:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Field with Backslash and Quotes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Field-with-Backslash-and-Quotes/m-p/540943#M153106</link>
      <description>&lt;P&gt;your log is JSON, try &lt;STRONG&gt;spath&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 01:38:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Field-with-Backslash-and-Quotes/m-p/540943#M153106</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2021-02-23T01:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Field with Backslash and Quotes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Field-with-Backslash-and-Quotes/m-p/540965#M153118</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/170988"&gt;@ank15july96&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;You can try spath as suggested by&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/184221"&gt;@to4kawa&lt;/a&gt; as it will extract all the fields json &amp;amp; xml.&lt;/P&gt;&lt;P&gt;Below may help to extract the second occurrence...&lt;/P&gt;&lt;P&gt;|rex field=_raw&amp;nbsp;max_match=0 "errorCode\\\\\":(?&amp;lt;code&amp;gt;\d+)")&amp;nbsp; | eval code=mvindex(code,1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 05:49:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Field-with-Backslash-and-Quotes/m-p/540965#M153118</guid>
      <dc:creator>saravanan90</dc:creator>
      <dc:date>2021-02-23T05:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Field with Backslash and Quotes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Field-with-Backslash-and-Quotes/m-p/540969#M153119</link>
      <description>&lt;P&gt;Please give me the entire log.&lt;BR /&gt;There is also a way to do spath.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 07:28:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Field-with-Backslash-and-Quotes/m-p/540969#M153119</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2021-02-23T07:28:20Z</dc:date>
    </item>
  </channel>
</rss>

