title: PHP Regex Help for Parsing Price from a String
body: <p>I know this topic has been covered to some degree, but after a few days I'm still having trouble figuring out the best way to parse a price from a block of text. </p>
  
  <p>Here's are some examples:
  This car is $15k and has $200 in upgrades
  Those belts are USD 500.00 and I'm asking 50 for shipping</p>
  
  <p>My approach has been to do three separate Regex matches:</p>
  
  <ol>
  <li>To find the prices that are abbreviated with a K</li>
  <li>To find the prices with a prefix</li>
  <li>To find the prices with a suffix</li>
  </ol>
  
  <h1>look for dollars with thousands abbreviated</h1>
  
  <pre><code>preg_match_all('/^[0-9,]+(\.[0-9]{2})?(k)+$/', 
                      strtolower($description), $price_array1);
  </code></pre>
  
  <h1>look for dollars with prefixes</h1>
  
  <pre><code>preg_match_all('/^(\$|\$ |price|price |price is |price:|price: |us|us |usd|usd |asking|asking |wanting|wanting |want|want |sgd|euro|euro |£|£ |€|€ |gbp|gbp |cdn|cdn |)+[0-9,]+(\.[0-9]{2})?$/', strtolower($description), $price_array2);
  </code></pre>
  
  <h1>look for dollars with suffixes</h1>
  
  <pre><code>preg_match_all('/(\$[0-9,]+(\.[0-9]{2})?)( eur|eur| firm| obo| shipped| \$|\$| €|€| £|£| gbp|gbp| dollar| aud)+/', strtolower($description), $price_array3);
  </code></pre>
  
  <p>But actually none of these seems to be working. I think I have my Regex correct? But not sure why they're not matching anything. 
  I will admit I'm a bit confused about whether I should use ^ and $ but I've tried it with and without and it doesn't seem to make a difference. 
  Any help would be appreciated. Thanks. </p>