<?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 do I mask a pattern using sedcmd in props.conf? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-mask-a-pattern-using-sedcmd-in-props-conf/m-p/217067#M42717</link>
    <description>&lt;P&gt;Try this (assuming the backslashes are part of the log)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;s/\\("password\\":\\")([^\\]+)(\\")/$1masked$3/g
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 22 Jun 2016 18:52:55 GMT</pubDate>
    <dc:creator>sundareshr</dc:creator>
    <dc:date>2016-06-22T18:52:55Z</dc:date>
    <item>
      <title>How do I mask a pattern using sedcmd in props.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-mask-a-pattern-using-sedcmd-in-props-conf/m-p/217066#M42716</link>
      <description>&lt;P&gt;How do I replace/mask the pattern below in props.conf..?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;pattern
\"password\":\"passtest@123\"

expecting  
\"password\":\"masked\"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Jun 2016 18:47:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-mask-a-pattern-using-sedcmd-in-props-conf/m-p/217066#M42716</guid>
      <dc:creator>prakash007</dc:creator>
      <dc:date>2016-06-22T18:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I mask a pattern using sedcmd in props.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-mask-a-pattern-using-sedcmd-in-props-conf/m-p/217067#M42717</link>
      <description>&lt;P&gt;Try this (assuming the backslashes are part of the log)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;s/\\("password\\":\\")([^\\]+)(\\")/$1masked$3/g
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Jun 2016 18:52:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-mask-a-pattern-using-sedcmd-in-props-conf/m-p/217067#M42717</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-06-22T18:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do I mask a pattern using sedcmd in props.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-mask-a-pattern-using-sedcmd-in-props-conf/m-p/217068#M42718</link>
      <description>&lt;P&gt;Thanks it worked...just for my understanding..why do we use $1 and $3 in there..?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 19:42:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-mask-a-pattern-using-sedcmd-in-props-conf/m-p/217068#M42718</guid>
      <dc:creator>prakash007</dc:creator>
      <dc:date>2016-06-22T19:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do I mask a pattern using sedcmd in props.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-mask-a-pattern-using-sedcmd-in-props-conf/m-p/217069#M42719</link>
      <description>&lt;P&gt;The original data is captured in 3 groups. The first group ($1) has \"password\":\" the second group has the password and the third group has \". $1masked$2, basically means use whatever is captured in group 1 followed by "masked" followed by whatever is captured in group 3&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 19:46:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-mask-a-pattern-using-sedcmd-in-props-conf/m-p/217069#M42719</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-06-22T19:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do I mask a pattern using sedcmd in props.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-mask-a-pattern-using-sedcmd-in-props-conf/m-p/217070#M42720</link>
      <description>&lt;P&gt;For me it is not working. The output raw event is printed as $1masked$3. &lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2017 21:28:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-mask-a-pattern-using-sedcmd-in-props-conf/m-p/217070#M42720</guid>
      <dc:creator>ankithreddy777</dc:creator>
      <dc:date>2017-07-05T21:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do I mask a pattern using sedcmd in props.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-mask-a-pattern-using-sedcmd-in-props-conf/m-p/217071#M42721</link>
      <description>&lt;P&gt;try this . In above use case backslash is present before and after password&lt;/P&gt;

&lt;P&gt;s/(\"password\":\")(\S+.*)(\")/$1xxxxxxx$3/g&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2017 14:16:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-mask-a-pattern-using-sedcmd-in-props-conf/m-p/217071#M42721</guid>
      <dc:creator>sbbadri</dc:creator>
      <dc:date>2017-07-06T14:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I mask a pattern using sedcmd in props.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-mask-a-pattern-using-sedcmd-in-props-conf/m-p/217072#M42722</link>
      <description>&lt;P&gt;my original data is&lt;BR /&gt;
id=A123 clientid:123456 SSLR&lt;/P&gt;

&lt;P&gt;need to mask 123456&lt;BR /&gt;
I used&lt;BR /&gt;
s/(clientid\W)(\d+)(\s\w\w\w\w)/$1masked$3/g&lt;/P&gt;

&lt;P&gt;my output&lt;BR /&gt;
id=A123 $1masked$3&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2017 16:03:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-mask-a-pattern-using-sedcmd-in-props-conf/m-p/217072#M42722</guid>
      <dc:creator>ankithreddy777</dc:creator>
      <dc:date>2017-07-06T16:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I mask a pattern using sedcmd in props.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-mask-a-pattern-using-sedcmd-in-props-conf/m-p/217073#M42723</link>
      <description>&lt;P&gt;Is this the output you are expecting...??&lt;/P&gt;

&lt;P&gt;id=A123 clientid:xxxxxx SSLR     &lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2017 16:18:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-mask-a-pattern-using-sedcmd-in-props-conf/m-p/217073#M42723</guid>
      <dc:creator>prakash007</dc:creator>
      <dc:date>2017-07-06T16:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I mask a pattern using sedcmd in props.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-mask-a-pattern-using-sedcmd-in-props-conf/m-p/217074#M42724</link>
      <description>&lt;P&gt;my original data is&lt;BR /&gt;
id=A123 clientid:123456 SSLR&lt;/P&gt;

&lt;P&gt;need to mask 123456&lt;BR /&gt;
I used&lt;BR /&gt;
s/(clientid\W)(\d+)(\s\w\w\w\w)/$1masked$3/g&lt;/P&gt;

&lt;P&gt;you can try this....&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"s/clientid:(\d+)/clientid:xxxxxx/g"

OUTPUT : id=A128 clientid:xxxxxx SSLR

"s/clientid\:(\d+)\s\S+/xxxxxx/g"

OUTPUT :  id=A128 xxxxxx
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 06 Jul 2017 17:45:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-mask-a-pattern-using-sedcmd-in-props-conf/m-p/217074#M42724</guid>
      <dc:creator>prakash007</dc:creator>
      <dc:date>2017-07-06T17:45:06Z</dc:date>
    </item>
  </channel>
</rss>

