title: Using sed to find and replace a range of numbers
body: <p>first poster here.</p>
  
  <p>Trying to use sed to find and replace a word. Code is as follows:</p>
  
  <pre><code>configFile=ConnectionConfig.xml
  sed 's/30??\" authentication=\"someuniqueauthkey/'$1'\" authentication=\"someuniqueauthkey/' $configFile
  </code></pre>
  
  <p>And I'd run the file like this:</p>
  
  <pre><code>./choosePort.sh 3001
  </code></pre>
  
  <p>When I run this code, there are no errors given like bad regex format, it just doesn't replace anything and the contents of tempXml.xml are just the contents of ConnectionConfig, unchanged.</p>
  
  <p>What I'd like to be able to do is recognise any number 3000 - 3099 in the 30?? part of the expression, which I thought was what the '?' did.</p>
  
  <p>The input line I'm trying to change is:</p>
  
  <pre><code>&lt;host id="0" address="someip" port="3001" authentication="someauthkey"
  </code></pre>
  
  <p>Thanks in advance.
  (Ip and authkeys in file blanked out for security reasons).</p>