title: How to replace numbers in SQL
body: <p>My database has a lot of descriptions which are similar to each other and I want to group them together, but because of different numbers, they are not being grouped together. So is there any way I can mask the numbers and make the descriptions same.</p>
  
  <p>We can do that in Excel or Notepad++, using find and replace, so anyway in which it would be possible in SQL. I know we can replace in SQL using the function </p>
  
  <pre><code>REPLACE('column', 'new input', 'to be replaced')
  </code></pre>
  
  <p>But how to do it for regex, as the numbers can be in any combination. </p>
  
  <p>I am using PostgreSQL.</p>
  
  <p>Some inputs :-</p>
  
  <pre><code>sample input description 123
  sample input description 456
  this is another description 678
  this is another description 999
  </code></pre>
  
  <p>I would like to convert them to:-</p>
  
  <pre><code>sample input description xxx
  sample input description xxx
  this is another description xxx
  this is another description xxx
  </code></pre>
  
  <p>the numbers can be anywhere.</p>
  
  <p>I am doing it on redshift.</p>