title: php - currency regex not working in php, elsewhere is
body: <p>I have this pregex <code>/[A-Z]{3}\s\(.\)/</code> which is working on <a href="http://regexr.com/" rel="nofollow">regexr.com</a> but when I use it in php with <code>preg_match()</code> it returns false with <code>USD ($)</code>. What am I doing wrong?</p>
  
  <p>EDIT:
  My php version is <strong>5.4.32</strong></p>
  
  <pre><code>if(preg_match('/[A-Z]{3}\s\(.\)/g', $var)){
              return $var;
          }else{
             return 'Money error';
          }
  </code></pre>
  
  <p>This returns "Money error" with $var = 'USD ($)'; for me.</p>