<?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 regex for masking in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-regex-for-masking/m-p/467372#M131531</link>
    <description>&lt;P&gt;related answer: &lt;A href="https://answers.splunk.com/answers/824299/anonymize-data-from-json-file.html"&gt;https://answers.splunk.com/answers/824299/anonymize-data-from-json-file.html&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [password-anonymizer]
 REGEX = (?m)(.*-password )\w+(.*)
 FORMAT = $1#######$2
 DEST_KEY =_raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For &lt;CODE&gt;DEST_KEY =_raw&lt;/CODE&gt; , you should keep all text in the event by REGEX.&lt;/P&gt;

&lt;P&gt;@richgalloway 's way or my way, As you wish.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Data/Anonymizedata"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Data/Anonymizedata&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 29 May 2020 22:12:23 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-05-29T22:12:23Z</dc:date>
    <item>
      <title>Help regex for masking</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-regex-for-masking/m-p/467370#M131529</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Can someone please help me regex a password field to mask data?&lt;/P&gt;
&lt;P&gt;I've been trying to figure out how to mask the password in the following example;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;npx violation-comments-to-cloud-command-line -username &lt;A href="mailto:JoeSmith@company.com" target="_blank"&gt;JoeSmith@company.com&lt;/A&gt; &lt;STRONG&gt;-password abcdef78&lt;/STRONG&gt; -ws walace -rs ttcc-lsls -prid 1441 -v CHECKSTYLE . '.*/reports/filename-goes-here-results.xml$' ESLint -keep-old-comments true -www1 true&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;I've tried many variations but it either deletes the remainder of the event or doesn't work.&lt;/P&gt;
&lt;P&gt;[password-anonymizer]&lt;BR /&gt;REGEX =(?m)^(-password\s).*$&lt;BR /&gt;FORMAT = $1########&lt;BR /&gt;DEST_KEY = _raw&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 18:24:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-regex-for-masking/m-p/467370#M131529</guid>
      <dc:creator>mishutts</dc:creator>
      <dc:date>2020-06-08T18:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: Help regex for masking</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-regex-for-masking/m-p/467371#M131530</link>
      <description>&lt;P&gt;Try using &lt;CODE&gt;SEDCMD&lt;/CODE&gt; in your props.conf file.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[mysourcetype]
SEDCMD-maskpw = s/-password -w+/-password ########/
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 May 2020 20:11:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-regex-for-masking/m-p/467371#M131530</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-05-29T20:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: Help regex for masking</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-regex-for-masking/m-p/467372#M131531</link>
      <description>&lt;P&gt;related answer: &lt;A href="https://answers.splunk.com/answers/824299/anonymize-data-from-json-file.html"&gt;https://answers.splunk.com/answers/824299/anonymize-data-from-json-file.html&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [password-anonymizer]
 REGEX = (?m)(.*-password )\w+(.*)
 FORMAT = $1#######$2
 DEST_KEY =_raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For &lt;CODE&gt;DEST_KEY =_raw&lt;/CODE&gt; , you should keep all text in the event by REGEX.&lt;/P&gt;

&lt;P&gt;@richgalloway 's way or my way, As you wish.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Data/Anonymizedata"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Data/Anonymizedata&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2020 22:12:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-regex-for-masking/m-p/467372#M131531</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-29T22:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help regex for masking</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-regex-for-masking/m-p/467373#M131532</link>
      <description>&lt;P&gt;Thank you. This worked like a charm.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2020 18:59:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-regex-for-masking/m-p/467373#M131532</guid>
      <dc:creator>mishutts</dc:creator>
      <dc:date>2020-06-01T18:59:27Z</dc:date>
    </item>
  </channel>
</rss>

