title: Conditional RegEx character
body: <p>How can I do a regex expression with a conditional character?</p>
  
  <p>For example I have the following expression:</p>
  
  <pre><code>preg_replace(/\$[0-9]{1,10}|[0-9]{1,10}\$/, '', $content);
  </code></pre>
  
  <p>This replaces $9000 and 9000$.
  Can I simplify that expression ? So that it will still replace the price if the $ character is at the begining or at the end of the number?</p>