<?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: how to anonymize specific variables data from JSON File in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/504858#M2023</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[anony_raw1]
REGEX = (?m)(.*ENVIRONMENT\":\")([^\"]+)(\".*)
FORMAT = $1$3
DEST_KEY = _raw

[anony_raw2]
REGEX = (?m)(.*USER\":\")([^\"]+)(\".*)
FORMAT = $1$3
DEST_KEY = _raw

[anony_raw3]
REGEX = (?m)(.*USERPASSD\":\")([^\"]+)(\".*)
FORMAT = $1$3
DEST_KEY = _raw&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There should need three anonymize stanza,I guess.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jun 2020 19:59:48 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-06-17T19:59:48Z</dc:date>
    <item>
      <title>how to anonymize specific variables data from JSON File</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/504752#M2004</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to mask just specific values.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is an example of a json event return in splunk :&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%"&gt;{"MemorySize": 256, "region": "ca-central-1", "TracingConfig": \{"Mode": "PassThrough"\}, "RevisionId": "777", "Handler": "handleRequest", "Timeout": 600, "LastModified": "2020-05-27T14:05:43.839+0000", "Environment": \&lt;STRONG&gt;{"Variables": \{"ENVIRONMENT": "dev", "USER": "username",&amp;nbsp; "USERPASSD": "password", \}\}&lt;/STRONG&gt;, "Role": "arn:aws:iam::666:role/X", "VpcConfig": \{"SubnetIds": ["subnet-000", "subnet-111"], "VpcId": "vpc-333", "SecurityGroupIds": ["sg-444"]\}, "CodeSize": 5555, "Description": "Lambda", "Runtime": "java11", "Version": "$LATEST"\}}&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;sensitive data&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;appear&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in clear specifically&amp;nbsp; in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Environment&amp;gt;Variables&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In this section, we have&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;variables&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;: the data are not the same in each event, we can not create a regex with specific key name because it always changes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How can I mask all values in the&amp;nbsp;Environment&amp;gt;Variables WITHOUT masking the key ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Example of result I want :&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%"&gt;&lt;P&gt;{"MemorySize": 256, "region": "ca-central-1", "TracingConfig": \{"Mode": "PassThrough"\}, "RevisionId": "777", "Handler": "handleRequest", "Timeout": 600, "LastModified": "2020-05-27T14:05:43.839+0000", "Environment": \&lt;STRONG&gt;&lt;STRONG&gt;{"Variables": \{"ENVIRONMENT":&amp;nbsp;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;STRONG&gt;XXXXXX, "USER":&amp;nbsp;&lt;/STRONG&gt;&lt;STRONG&gt;XXXXXX,&amp;nbsp; "USERPASSD":&amp;nbsp;&lt;/STRONG&gt;&lt;STRONG&gt;XXXXXX, \}\}&lt;/STRONG&gt;, "Role": "arn:aws:iam::666:role/X", "VpcConfig": \{"SubnetIds": ["subnet-000", "subnet-111"], "VpcId": "vpc-333", "SecurityGroupIds": ["sg-444"]\}, "CodeSize": 5555, "Description": "Lambda", "Runtime": "java11", "Version": "$LATEST"\}}&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried a props.conf like that :&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%"&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;[sourcetype]&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;INDEXED_EXTRACTION = json &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;KV_MODE = none &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;EXTRACT-var = \{\"Variables\"\:\s*\\\{(?&amp;lt;Variables&amp;gt;[^\}]+)\\&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;TRANSFORMS-anony = anony_raw&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;and a transforms.conf :&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%"&gt;&lt;P&gt;[anony_raw]&lt;/P&gt;&lt;P&gt;REGEX = s/(\s*\"\s*[^\"]*\"[^\"]*\"([^\"]*)\s*\"\s*\,*)+&lt;/P&gt;&lt;P&gt;FORMAT = $1XXXXXX&lt;/P&gt;&lt;P&gt;DEST_KEY =_meta&lt;/P&gt;&lt;P&gt;SOURCE_KEY =_meta&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;But it doesn't work at all...&lt;/P&gt;&lt;P class="p1"&gt;Can you help me ?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2020 08:17:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/504752#M2004</guid>
      <dc:creator>mah</dc:creator>
      <dc:date>2020-06-17T08:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to anonymize specific variables data from JSON File</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/504758#M2005</link>
      <description>&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Getting-Data-In/Anonymize-data-from-JSON-File/td-p/502195?childToView=825360#answer-825360" target="_blank"&gt;https://community.splunk.com/t5/Getting-Data-In/Anonymize-data-from-JSON-File/td-p/502195?childToView=825360#answer-825360&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I answered a similar question before.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2020 09:21:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/504758#M2005</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-06-17T09:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to anonymize specific variables data from JSON File</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/504761#M2006</link>
      <description>&lt;P&gt;Yes, I've seen this answer and tried the solution but doesn't work at all.&lt;/P&gt;&lt;P&gt;props.conf :&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%"&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;[description]&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;INDEXED_EXTRACTION = json &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;KV_MODE = none &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;TRANSFORMS-anony = anony, anony_raw&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;TRUNCATE = 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;SHOULD_LINEMERGE = false&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;transforms.conf&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%"&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;[anony]&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;INGEST_EVAL = Variables=md5(Variables)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;WRITE_META = true&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p2"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;[anony_raw] &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;REGEX = (?m)(\s*\"\s*[^\"]*\"[^\"]*\"([^\"]*)\s*\"\s*\,*)+&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;FORMAT = $1XXXXXXX"&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;DEST_KEY = _raw&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But thats still not working...&lt;/P&gt;&lt;P&gt;Did I make a mistake somewhere ?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2020 09:41:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/504761#M2006</guid>
      <dc:creator>mah</dc:creator>
      <dc:date>2020-06-17T09:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to anonymize specific variables data from JSON File</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/504765#M2007</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw="{\"MemorySize\":256,\"region\":\"ca-central-1\",\"TracingConfig\":{\"Mode\":\"PassThrough\"},\"RevisionId\":\"777\",\"Handler\":\"handleRequest\",\"Timeout\":600,\"LastModified\":\"2020-05-27T14:05:43.839+0000\",\"Environment\":{\"Variables\":{\"ENVIRONMENT\":\"XXXXXX\",\"USER\":\"XXXXXX\",\"USERPASSD\":\"XXXXXX\"}},\"Role\":\"arn:aws:iam::666:role/X\",\"VpcConfig\":{\"SubnetIds\":[\"subnet-000\",\"subnet-111\"],\"VpcId\":\"vpc-333\",\"SecurityGroupIds\":[\"sg-444\"]},\"CodeSize\":5555,\"Description\":\"Lambda\",\"Runtime\":\"java11\",\"Version\":\"$LATEST\"}"
| spath&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[anony]

INGEST_EVAL = Environment.Variables.ENVIRONMENT:=md5(Environment.Variables.ENVIRONMENT),Environment.Variables.USER:=md5(Environment.Variables.USER),Environment.Variables.USERPASSD:=md5(Environment.Variables.USERPASSD)
WRITE_META = true

[anony_raw]
REGEX = (?m)(.*Environment\":{)(.*?})(.*)
FORMAT = $1$3
DEST_KEY = _raw&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2020 10:01:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/504765#M2007</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-06-17T10:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: how to anonymize specific variables data from JSON File</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/504773#M2009</link>
      <description>&lt;P&gt;OK thanks, but&amp;nbsp;I always have the same starting problem: all the &lt;STRONG&gt;key: value&lt;/STRONG&gt; present in Variables {} &lt;STRONG&gt;are not the same in each event&lt;/STRONG&gt; my starting question is: how I put your solution in place for the key: value which change all the time and that I cannot know in advance ?&lt;/P&gt;&lt;P&gt;I can not set up your solution because you wrote specific keys.&lt;/P&gt;&lt;P&gt;Example of &lt;STRONG&gt;new&lt;/STRONG&gt; event :&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%"&gt;&lt;P class="p1"&gt;{"Description": &amp;nbsp;None, "LastModified": "2019-12-05T10:58:05.308+0000", "TracingConfig": {"Mode": "PassThrough"}, "Version": "$LATEST", "CodeSize": 1909, "Handler": "handler", "RevisionId": "111", "MemorySize": 128, "Timeout": 180, "Environment": {"Variables": {"&lt;STRONG&gt;MAILING_LIST": "xxx@xxx.com", "PARAM_NAME": "toto", "NAME": "titi", "FLAG_NAME": "OK_flag", "ENVIRONMENT": "test", "SECRET_NAME": "123_cred", "REGION": "eu-east-1", "MAILING_LIST_PARAM_NAME": "/walnut/mailing_list"&lt;/STRONG&gt;}}, "region": "eu-east-1", "Runtime": "python3.6"}&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 17 Jun 2020 11:51:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/504773#M2009</guid>
      <dc:creator>mah</dc:creator>
      <dc:date>2020-06-17T11:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to anonymize specific variables data from JSON File</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/504815#M2015</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222120"&gt;@mah&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;I created a RegEx that might work.&amp;nbsp; I could not find a way to make it super-dynamic, but if you know the max number of key:value pairs in the data, it should work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(?&amp;lt;="Variables"\:\s\\\{)(?&amp;gt;\"\w+\"\:\s\"(\S+)\"\,\s)?(?&amp;gt;\"\w+\"\:\s\"(\S+)\"\,\s)?(?&amp;gt;\"\w+\"\:\s\"(\S+)\"\,\s)?(?&amp;gt;\"\w+\"\:\s\"(\S+)\"\,\s)?&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This example works if you have 4 or less Key/Value pairs. They will be assigned to group1, group2 etc.&lt;/P&gt;&lt;P&gt;If you expect more than 4, you have to append more of these:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(?&amp;gt;\"\w+\"\:\s\"(\S+)\"\,\s)?&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Note: &lt;/FONT&gt;This does work with the format where the values are in quotes, in your initial post you had an example where the values were not within quotes.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://regex101.com/r/eXmyO3/4" target="_self"&gt;Reg101 link&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2020 15:19:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/504815#M2015</guid>
      <dc:creator>rnowitzki</dc:creator>
      <dc:date>2020-06-17T15:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to anonymize specific variables data from JSON File</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/504858#M2023</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[anony_raw1]
REGEX = (?m)(.*ENVIRONMENT\":\")([^\"]+)(\".*)
FORMAT = $1$3
DEST_KEY = _raw

[anony_raw2]
REGEX = (?m)(.*USER\":\")([^\"]+)(\".*)
FORMAT = $1$3
DEST_KEY = _raw

[anony_raw3]
REGEX = (?m)(.*USERPASSD\":\")([^\"]+)(\".*)
FORMAT = $1$3
DEST_KEY = _raw&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There should need three anonymize stanza,I guess.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2020 19:59:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/504858#M2023</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-06-17T19:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to anonymize specific variables data from JSON File</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/505760#M2140</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/64317"&gt;@rnowitzki&lt;/a&gt;&amp;nbsp;, thank you for your reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to apply your regex but the problem is that some keys are written with several words like :&lt;/P&gt;&lt;P&gt;"USER PASSWORD": "12345abcd"&lt;/P&gt;&lt;P&gt;And your regex does not work anymore...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2020 15:12:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/505760#M2140</guid>
      <dc:creator>mah</dc:creator>
      <dc:date>2020-06-23T15:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to anonymize specific variables data from JSON File</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/505897#M2162</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222120"&gt;@mah&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Ok, then we have to add optional space and optional second word to the regex.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(?&amp;lt;="Variables"\:\s\\\{)(?&amp;gt;\"\w+?\s?\w+\"\:\s\"(\S+)\"\,\s)?(?&amp;gt;\"\w+?\s?\w+\"\:\s\"(\S+)\"\,\s)?(?&amp;gt;\"\w+?\s?\w+\"\:\s\"(\S+)\"\,\s)?(?&amp;gt;\"\w+?\s?\w+\"\:\s\"(\S+)\"\,\s)?&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;The question marks before \s and \w+ mean: there &lt;EM&gt;might&lt;/EM&gt; or &lt;EM&gt;might not&lt;/EM&gt; be a space and another word after the first word....&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The example shown above works with max 4 key value pairs. If you expect more, append more of these:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(?&amp;gt;\"\w+?\s?\w+\"\:\s\"(\S+)\"\,\s)?&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Hope this works better.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 07:51:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/505897#M2162</guid>
      <dc:creator>rnowitzki</dc:creator>
      <dc:date>2020-06-24T07:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to anonymize specific variables data from JSON File</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/505930#M2165</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/64317"&gt;@rnowitzki&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works but with this regex :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(?&amp;gt;\"\S+?\s?\S+\"\:\s\"(\S+)\"\,\s)?&lt;/LI-CODE&gt;&lt;P&gt;The second point is in the first part of the regex is :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(?&amp;lt;="Variables"\:\s\\\{)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;but it does not close the brace symbol so the issue is that I want to apply this ONLY for Key/Value in the section Variables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want to say is for example, if I put 10 times the key/value regex, while I have a section Variables with only 2 key/value pair, it will mask the data OUTSIDE the section Variables.&lt;/P&gt;&lt;P&gt;I find a regex that extract this section, but I don't know how to &lt;STRONG&gt;include&lt;/STRONG&gt; your solution above :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;\{\"Variables\"\:\s*\\\{(?&amp;lt;Variables&amp;gt;[^\}]+)\\&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you hav an idea ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 10:25:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/505930#M2165</guid>
      <dc:creator>mah</dc:creator>
      <dc:date>2020-06-24T10:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to anonymize specific variables data from JSON File</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/505945#M2167</link>
      <description>&lt;P&gt;I don't get the issue on reg101 (it does not select anything outside of the "variables" section).&lt;/P&gt;&lt;P&gt;But I updated it,&amp;nbsp; by appending&amp;nbsp; the closing 2 brackets at the end.&lt;/P&gt;&lt;P&gt;&lt;A href="https://regex101.com/r/eXmyO3/6" target="_blank"&gt;https://regex101.com/r/eXmyO3/6&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(?&amp;lt;="Variables"\:\s\\\{)(?&amp;gt;\"\S+?\s?\S+\"\:\s\"(\S+)\"\,\s)?(?&amp;gt;\"\S+?\s?\S+\"\:\s\"(\S+)\"\,\s)?(?&amp;gt;\"\S+?\s?\S+\"\:\s\"(\S+)\"\,\s)?(?&amp;gt;\"\S+?\s?\S+\"\:\s\"(\S+)\"\,\s)\\\}\\\}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Getting closer - i hope &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 11:56:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/505945#M2167</guid>
      <dc:creator>rnowitzki</dc:creator>
      <dc:date>2020-06-24T11:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to anonymize specific variables data from JSON File</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/505990#M2177</link>
      <description>&lt;P&gt;That great !&amp;nbsp;My case is solved !&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the last regex I tried to put more regex key/value that the Variables section contains, and it doesn't go outside the section.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://regex101.com/r/eXmyO3/7" target="_blank"&gt;https://regex101.com/r/eXmyO3/7&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I think I can put&amp;nbsp;&lt;SPAN class="s1"&gt;SEDCMD parameter into props.conf and not use a transforms.conf in addition.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Nice job Thanks a lot !&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 14:52:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/505990#M2177</guid>
      <dc:creator>mah</dc:creator>
      <dc:date>2020-06-24T14:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to anonymize specific variables data from JSON File</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/506025#M2183</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222120"&gt;@mah&lt;/a&gt;&amp;nbsp;you're welcome. I learned something myself &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You might want to set my last reply as the solution, for future splunkers having similiar issues.&lt;/P&gt;&lt;P&gt;Cheers&lt;BR /&gt;Ralph&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 18:18:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/how-to-anonymize-specific-variables-data-from-JSON-File/m-p/506025#M2183</guid>
      <dc:creator>rnowitzki</dc:creator>
      <dc:date>2020-06-24T18:18:46Z</dc:date>
    </item>
  </channel>
</rss>

