<?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: Help with JSON regex replace in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-with-JSON-regex-replace/m-p/604136#M210152</link>
    <description>&lt;P&gt;Thank you for this.&amp;nbsp; For some reason I had to add a few more \ to make this work.&amp;nbsp; See below:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;“s/\”name\”\:\”[^\”]+\”/\”name\":\"###############\"/g"&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Jul 2022 14:55:45 GMT</pubDate>
    <dc:creator>ballen1</dc:creator>
    <dc:date>2022-07-01T14:55:45Z</dc:date>
    <item>
      <title>Help with JSON regex replace</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-JSON-regex-replace/m-p/603880#M210076</link>
      <description>&lt;P&gt;Command:&lt;/P&gt;&lt;PRE&gt;rex mode=sed "s/\"name":\s\"[^\"]+\"/"name":"###############"/g"&lt;/PRE&gt;&lt;P&gt;Regex seems to work fine in &lt;A href="https://regex101.com/r/IjP8Bu/1" target="_self"&gt;Regex101&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;However, I seem to continue to get this error:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Error in 'SearchParser': Missing a search command before '^'. Error at position '69' of search query rex mode=sed "s/\"c...{snipped} {errorcontext = n_id"\s\"[^\"]+\"/"co}'.&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;I'm trying to mask a json key:value pair.&amp;nbsp; See below:&lt;/P&gt;&lt;PRE&gt;"name": "john doe" ----&amp;gt; "name": "######"&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Jun 2022 01:57:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-JSON-regex-replace/m-p/603880#M210076</guid>
      <dc:creator>ballen1</dc:creator>
      <dc:date>2022-06-30T01:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Help with JSON regex replace</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-JSON-regex-replace/m-p/603885#M210078</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;It is missing a&amp;nbsp;&lt;STRONG&gt;\&amp;nbsp;&lt;/STRONG&gt;after the name and before the&amp;nbsp;&lt;STRONG&gt;"&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;The correct one is:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex mode=sed "s/\"name\":\s\"[^\"]+\"/"name":"###############"/g"&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 30 Jun 2022 04:59:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-JSON-regex-replace/m-p/603885#M210078</guid>
      <dc:creator>danielcj</dc:creator>
      <dc:date>2022-06-30T04:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help with JSON regex replace</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-JSON-regex-replace/m-p/603965#M210109</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thank you for the reply.&amp;nbsp; That removed that error.&amp;nbsp; However, it still doesn't mask the "name" field in the search.&lt;/P&gt;&lt;P&gt;"name" still shows as:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;"name": "john doe"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jun 2022 13:04:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-JSON-regex-replace/m-p/603965#M210109</guid>
      <dc:creator>ballen1</dc:creator>
      <dc:date>2022-06-30T13:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Help with JSON regex replace</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-JSON-regex-replace/m-p/603979#M210112</link>
      <description>&lt;P&gt;ah.&amp;nbsp; I figured it out.&amp;nbsp; I had to modify it like the following for it to replace properly:&lt;/P&gt;&lt;P class=""&gt;“s/\”name\”\:\”[^\”]+\”/\”name\":\"###############\"/g"&lt;/P&gt;&lt;P class=""&gt;This is using splunk cloud btw.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jun 2022 14:31:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-JSON-regex-replace/m-p/603979#M210112</guid>
      <dc:creator>ballen1</dc:creator>
      <dc:date>2022-06-30T14:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Help with JSON regex replace</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-JSON-regex-replace/m-p/604136#M210152</link>
      <description>&lt;P&gt;Thank you for this.&amp;nbsp; For some reason I had to add a few more \ to make this work.&amp;nbsp; See below:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;“s/\”name\”\:\”[^\”]+\”/\”name\":\"###############\"/g"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2022 14:55:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-JSON-regex-replace/m-p/604136#M210152</guid>
      <dc:creator>ballen1</dc:creator>
      <dc:date>2022-07-01T14:55:45Z</dc:date>
    </item>
  </channel>
</rss>

