<?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: MAP with REGEX not working in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/MAP-with-REGEX-not-working/m-p/532882#M150540</link>
    <description>&lt;P&gt;I think Splunk is complaining about the embedded quotation marks in the &lt;FONT face="courier new,courier"&gt;map&lt;/FONT&gt; command.&amp;nbsp; Try escaping them.&lt;/P&gt;</description>
    <pubDate>Fri, 11 Dec 2020 22:19:22 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2020-12-11T22:19:22Z</dc:date>
    <item>
      <title>MAP with REGEX not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/MAP-with-REGEX-not-working/m-p/532876#M150539</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;i wanted to fetch some information from my logs. here is the scenario:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;index=xyz host=xxx.com source="/as/df/gh/*.log" "[error]" &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| rex field=_raw "LoadPlanName:\s(?P&amp;lt;LP_Name&amp;gt;[^\]]*)" &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| table LP_Name &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| dedup LP_Name&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;above query gives me the result as below&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LP_Name&lt;/STRONG&gt;&lt;BR /&gt;LP_abc&lt;BR /&gt;LP_abc1&lt;BR /&gt;LP_abc2&lt;/P&gt;&lt;P&gt;now from the same source i want to fetch other details for the LP_Name extracted above i.e LP_abc, LP_abc1, LP_abc2, for that i tried to create below query which is not working:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;index=xyz host=xxx.com source="/dir1/dir2/*.log" "[error]" &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| rex field=_raw "LoadPlanName:\s(?P&amp;lt;LP_Name&amp;gt;[^\]]*)" &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| table LP_Name &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| dedup LP_Name&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| map search = "search index=xyz host=xxx.com source="/dir1/dir2/*.log" "[completed]" &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| rex field=_raw "LoadPlanName:\s(?P&amp;lt;LPN&amp;gt;[^\]]*)"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;LPN=$LP_Name"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;For above query i have been getting below error:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Error in 'SearchParser': Missing a search command before '^'. Error at position '417' of search query 'search index=oitp host=ITCNCHN-LX4* source="/opt/o...{snipped} {errorcontext = s(?P&amp;lt;LPN&amp;gt;[^\]]*)" L}'.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;i have been struggling with it from a long time now, need help to get the the data that i desired. Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 21:54:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/MAP-with-REGEX-not-working/m-p/532876#M150539</guid>
      <dc:creator>berserkersyco</dc:creator>
      <dc:date>2020-12-11T21:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: MAP with REGEX not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/MAP-with-REGEX-not-working/m-p/532882#M150540</link>
      <description>&lt;P&gt;I think Splunk is complaining about the embedded quotation marks in the &lt;FONT face="courier new,courier"&gt;map&lt;/FONT&gt; command.&amp;nbsp; Try escaping them.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 22:19:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/MAP-with-REGEX-not-working/m-p/532882#M150540</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-12-11T22:19:22Z</dc:date>
    </item>
  </channel>
</rss>

