title: Why doesn't this regex work for grep?
body: <p>I'm trying to remove "Packet number 624 doesn't match" from a response so the obvious thing to try is</p>
  
  <pre><code>cat somefile.txt | grep -v "Packet number \d+ doesn't match"
  </code></pre>
  
  <p>If I remove the <code>-v</code>, just for testing, then it returns nothing. So maybe the command line is doing something with the <code>\d</code> or <code>+</code> first. So I have tried various combinations such as <code>\\d+ \\d\+ \\\\d+ \\\\d\+ [0-9]+ [0-9]\+</code>. Bingo!! That last one worked. Can someone explain what is going on here? If this is getting modified by the command line why does <code>echo "\d+"</code> still return <code>\d+</code>?</p>