<?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: regex works on regex101 but not splunk in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/regex-works-on-regex101-but-not-splunk/m-p/567368#M197714</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222460"&gt;@samneo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please share your sample data and configurations you are using?&lt;/P&gt;&lt;P&gt;KV&lt;/P&gt;</description>
    <pubDate>Fri, 17 Sep 2021 08:01:48 GMT</pubDate>
    <dc:creator>kamlesh_vaghela</dc:creator>
    <dc:date>2021-09-17T08:01:48Z</dc:date>
    <item>
      <title>regex works on regex101 but not splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-works-on-regex101-but-not-splunk/m-p/567367#M197713</link>
      <description>&lt;P&gt;Im trying to get a regex to work in splunk that works in regex101&lt;/P&gt;&lt;P&gt;Im using the below regex&lt;/P&gt;&lt;P&gt;\b(a_msg)\b[^"]+"([^"]*)"&lt;/P&gt;&lt;P&gt;this will extract everything after a_msg field and in between the "". I want to save this as a field extraction. Any idea how i can get this to work?&lt;/P&gt;&lt;P&gt;example data&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{"log":"&lt;/SPAN&gt;&lt;SPAN class="highlighted-existing-match highlighted-border-cat1"&gt;a_level=\"INFO\",&lt;/SPAN&gt;&lt;SPAN&gt; a_time=\"2021-09-17 07:33:35,210\", &lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;a_msg=\"CommissionRouteType: Client / clientId: 111/ planId: 111 / PolicyBusinessId: 111\","level":"info"}&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 08:04:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-works-on-regex101-but-not-splunk/m-p/567367#M197713</guid>
      <dc:creator>samneo</dc:creator>
      <dc:date>2021-09-17T08:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: regex works on regex101 but not splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-works-on-regex101-but-not-splunk/m-p/567368#M197714</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222460"&gt;@samneo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please share your sample data and configurations you are using?&lt;/P&gt;&lt;P&gt;KV&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 08:01:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-works-on-regex101-but-not-splunk/m-p/567368#M197714</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-09-17T08:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: regex works on regex101 but not splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-works-on-regex101-but-not-splunk/m-p/567370#M197715</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&amp;nbsp;Added to original post. There is no special configuration, i just want to be able to add it into field extraction via ui. We have splunk managed cloud so cannot amend from props.conf or any other backend&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 08:05:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-works-on-regex101-but-not-splunk/m-p/567370#M197715</guid>
      <dc:creator>samneo</dc:creator>
      <dc:date>2021-09-17T08:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: regex works on regex101 but not splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-works-on-regex101-but-not-splunk/m-p/567372#M197717</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222460"&gt;@samneo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try this?&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;\b(a_msg)\b[^\"]+\"(?&amp;lt;a_msg&amp;gt;[^\"]*)\"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Sample Code:&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults | eval _raw="{\"log\":\"a_level=\\\"INFO\\\", a_time=\\\"2021-09-17 07:33:35,210\\\",  a_msg=\\\"CommissionRouteType: Client / clientId: 111/ planId: 111 / PolicyBusinessId: 111\\\",\"level\":\"info\"}" |rex field=_raw "\b(a_msg)\b[^\"]+\"(?&amp;lt;a_msg&amp;gt;[^\"]*)\""&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Link:&lt;/P&gt;&lt;P&gt;&lt;A href="https://regex101.com/r/ZDYHZM/1" target="_blank"&gt;https://regex101.com/r/ZDYHZM/1&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;▄︻̷̿┻̿═━一 &amp;nbsp; &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 08:16:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-works-on-regex101-but-not-splunk/m-p/567372#M197717</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-09-17T08:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: regex works on regex101 but not splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-works-on-regex101-but-not-splunk/m-p/567378#M197719</link>
      <description>&lt;P&gt;this works perfectly,&lt;/P&gt;&lt;P&gt;thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 08:48:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-works-on-regex101-but-not-splunk/m-p/567378#M197719</guid>
      <dc:creator>samneo</dc:creator>
      <dc:date>2021-09-17T08:48:54Z</dc:date>
    </item>
  </channel>
</rss>

