<?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 REGEX - Replace numbers with an asterisk, multiple apperances in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/REGEX-Replace-numbers-with-an-asterisk-multiple-apperances/m-p/600042#M208874</link>
    <description>&lt;P&gt;Hi, I am trying to find a way to replace numbers in strings with an asterisk, if they are concatenated with one, and if not then also with one, using rex field, example:&lt;BR /&gt;&lt;BR /&gt;AA-1234-12-A&lt;BR /&gt;BB-1-132-B-1&lt;BR /&gt;56-CC-1-345&lt;BR /&gt;&lt;BR /&gt;to be replaced with:&lt;BR /&gt;&lt;BR /&gt;AA-*-*-A&lt;BR /&gt;BB-*-*-B-*&lt;BR /&gt;*-CC-*-*&lt;BR /&gt;&lt;BR /&gt;I tried multiple sed commands from the internet but they either don't work properly in splunk or do not solve my issue in the exact.&lt;BR /&gt;&lt;BR /&gt;Many thanks&lt;/P&gt;</description>
    <pubDate>Wed, 01 Jun 2022 09:28:36 GMT</pubDate>
    <dc:creator>KMoryson</dc:creator>
    <dc:date>2022-06-01T09:28:36Z</dc:date>
    <item>
      <title>REGEX - Replace numbers with an asterisk, multiple apperances</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-Replace-numbers-with-an-asterisk-multiple-apperances/m-p/600042#M208874</link>
      <description>&lt;P&gt;Hi, I am trying to find a way to replace numbers in strings with an asterisk, if they are concatenated with one, and if not then also with one, using rex field, example:&lt;BR /&gt;&lt;BR /&gt;AA-1234-12-A&lt;BR /&gt;BB-1-132-B-1&lt;BR /&gt;56-CC-1-345&lt;BR /&gt;&lt;BR /&gt;to be replaced with:&lt;BR /&gt;&lt;BR /&gt;AA-*-*-A&lt;BR /&gt;BB-*-*-B-*&lt;BR /&gt;*-CC-*-*&lt;BR /&gt;&lt;BR /&gt;I tried multiple sed commands from the internet but they either don't work properly in splunk or do not solve my issue in the exact.&lt;BR /&gt;&lt;BR /&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 09:28:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-Replace-numbers-with-an-asterisk-multiple-apperances/m-p/600042#M208874</guid>
      <dc:creator>KMoryson</dc:creator>
      <dc:date>2022-06-01T09:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX - Replace numbers with an asterisk, multiple apperances</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-Replace-numbers-with-an-asterisk-multiple-apperances/m-p/600044#M208875</link>
      <description>&lt;P&gt;Does something like this work for you?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex mode=sed "s/\d+/*/g"&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 01 Jun 2022 10:01:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-Replace-numbers-with-an-asterisk-multiple-apperances/m-p/600044#M208875</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-06-01T10:01:21Z</dc:date>
    </item>
  </channel>
</rss>

