<?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 SEDCMD to alter text - Redacting in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/SEDCMD-to-alter-text-Redacting/m-p/537769#M90120</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have events with text strings like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; ..._Code/&amp;gt; &lt;FONT color="#FF0000"&gt;&amp;lt;InDesc&amp;gt;&lt;FONT color="#0000FF"&gt;Diagnosis=Read Code,Comment=carrying | ladder and triped and&amp;nbsp; fell hurt&amp;nbsp; L Shoulder / upper back- issues is pain,DiagnosisSide=right&lt;/FONT&gt;&amp;lt;/InDesc&amp;gt;&lt;/FONT&gt; &amp;lt;First_Name...&lt;/P&gt;&lt;P&gt;I want to redact the blue text and can easily do so with this sort of thing:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; SEDCMD-test = s/(&amp;lt;InDesc&amp;gt;)[^&amp;lt;]+/\1Splunk_Redacted/g&lt;/P&gt;&lt;P&gt;Giving a result like:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;..._Code/&amp;gt; &amp;lt;InDesc&amp;gt;Splunk_Redacted&amp;lt;/InDesc&amp;gt; &amp;lt;First_Name..&lt;/P&gt;&lt;P&gt;BUT I would prefer to retain the structure of the blue text (i.e. replace the digits with 9 and the letters all with A or a but leaving the rest.&amp;nbsp; &amp;nbsp; I can do that part individually like this:&lt;/P&gt;&lt;P&gt;echo "Diagnosis=Read Code,Comment=carrying | ladder and triped and&amp;nbsp; fell hurt&amp;nbsp; L Shoulder / upper back- issues is pain,DiagnosisSide=right" | sed y/abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/aaaaaaaaaaaaaaaaaaaaaaaaaaAAAAAAAAAAAAAAAAAAAAAAAAAA9999999999/&lt;/P&gt;&lt;P&gt;And getting this output&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;Aaaaaaaaa=Aaaa Aaaa,Aaaaaaa=aaaaaaaa | aaaaaa aaa aaaaaa aaa&amp;nbsp; aaaa aaaa&amp;nbsp; A Aaaaaaaa / aaaaa aaaa- aaaaaa aa aaaa,AaaaaaaaaAaaa=aaaaa&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;But how can I combine them both to achieve this output:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;..._Code/&amp;gt; &lt;FONT color="#FF0000"&gt;&amp;lt;InDesc&amp;gt;&lt;/FONT&gt;&lt;FONT color="#0000FF"&gt;Aaaaaaaaa=Aaaa Aaaa,Aaaaaaa=aaaaaaaa | aaaaaa aaa aaaaaa aaa&amp;nbsp; aaaa aaaa&amp;nbsp; A Aaaaaaaa / aaaaa aaaa- aaaaaa aa aaaa,AaaaaaaaaAaaa=aaaaa&lt;/FONT&gt;&lt;FONT color="#FF0000"&gt;&amp;lt;/InDesc&amp;gt;&lt;/FONT&gt; &amp;lt;First_Name..&lt;/P&gt;&lt;P&gt;Any thoughts would be much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, Keith&lt;/P&gt;</description>
    <pubDate>Fri, 29 Jan 2021 02:28:02 GMT</pubDate>
    <dc:creator>KeithH</dc:creator>
    <dc:date>2021-01-29T02:28:02Z</dc:date>
    <item>
      <title>SEDCMD to alter text - Redacting</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/SEDCMD-to-alter-text-Redacting/m-p/537769#M90120</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have events with text strings like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; ..._Code/&amp;gt; &lt;FONT color="#FF0000"&gt;&amp;lt;InDesc&amp;gt;&lt;FONT color="#0000FF"&gt;Diagnosis=Read Code,Comment=carrying | ladder and triped and&amp;nbsp; fell hurt&amp;nbsp; L Shoulder / upper back- issues is pain,DiagnosisSide=right&lt;/FONT&gt;&amp;lt;/InDesc&amp;gt;&lt;/FONT&gt; &amp;lt;First_Name...&lt;/P&gt;&lt;P&gt;I want to redact the blue text and can easily do so with this sort of thing:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; SEDCMD-test = s/(&amp;lt;InDesc&amp;gt;)[^&amp;lt;]+/\1Splunk_Redacted/g&lt;/P&gt;&lt;P&gt;Giving a result like:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;..._Code/&amp;gt; &amp;lt;InDesc&amp;gt;Splunk_Redacted&amp;lt;/InDesc&amp;gt; &amp;lt;First_Name..&lt;/P&gt;&lt;P&gt;BUT I would prefer to retain the structure of the blue text (i.e. replace the digits with 9 and the letters all with A or a but leaving the rest.&amp;nbsp; &amp;nbsp; I can do that part individually like this:&lt;/P&gt;&lt;P&gt;echo "Diagnosis=Read Code,Comment=carrying | ladder and triped and&amp;nbsp; fell hurt&amp;nbsp; L Shoulder / upper back- issues is pain,DiagnosisSide=right" | sed y/abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/aaaaaaaaaaaaaaaaaaaaaaaaaaAAAAAAAAAAAAAAAAAAAAAAAAAA9999999999/&lt;/P&gt;&lt;P&gt;And getting this output&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;Aaaaaaaaa=Aaaa Aaaa,Aaaaaaa=aaaaaaaa | aaaaaa aaa aaaaaa aaa&amp;nbsp; aaaa aaaa&amp;nbsp; A Aaaaaaaa / aaaaa aaaa- aaaaaa aa aaaa,AaaaaaaaaAaaa=aaaaa&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;But how can I combine them both to achieve this output:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;..._Code/&amp;gt; &lt;FONT color="#FF0000"&gt;&amp;lt;InDesc&amp;gt;&lt;/FONT&gt;&lt;FONT color="#0000FF"&gt;Aaaaaaaaa=Aaaa Aaaa,Aaaaaaa=aaaaaaaa | aaaaaa aaa aaaaaa aaa&amp;nbsp; aaaa aaaa&amp;nbsp; A Aaaaaaaa / aaaaa aaaa- aaaaaa aa aaaa,AaaaaaaaaAaaa=aaaaa&lt;/FONT&gt;&lt;FONT color="#FF0000"&gt;&amp;lt;/InDesc&amp;gt;&lt;/FONT&gt; &amp;lt;First_Name..&lt;/P&gt;&lt;P&gt;Any thoughts would be much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, Keith&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 02:28:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/SEDCMD-to-alter-text-Redacting/m-p/537769#M90120</guid>
      <dc:creator>KeithH</dc:creator>
      <dc:date>2021-01-29T02:28:02Z</dc:date>
    </item>
  </channel>
</rss>

