title: PHP - ( Regex ) - Find Files that do not contain -num X num
body: <p>This is a general regex question,although I will apply it in PHP.</p>
  
  <p>I am trying to find all files that DO NOT contain strings like <code>-123x456</code> or <code>-12345x678</code> meaning that the format is always <code>-INT</code>x<code>INT</code>. (like image resolution) . </p>
  
  <p>This string is a part of the filename. and the "constsnts" are the minus ( - ) sign before the string and the X in the middle ( which can be both capital letters or not )</p>
  
  <p>With the help of <a href="http://www.gskinner.com/RegExr/" rel="nofollow">THIS</a> have come up with the expression:</p>
  
  <pre><code>^(?:(?!STRING).)*$
  </code></pre>
  
  <p>or in my case :</p>
  
  <pre><code>^(?:(?!x).)*$
  </code></pre>
  
  <p>But that will exclude all filenames that contain an <code>x</code></p>
  
  <p>How can I add the Numbers on both sides of the <code>x</code> when not knowing how many digits they are , but knowing that there COULD be a number before or after that is a part of the filename </p>
  
  <p>(e.g. <code>myfile-x1-456x78</code>9 VR. <code>myfile-x12</code> )</p>
  
  <p>I need a separate solution for <code>x</code> in specific , or for <code>X | x</code>  ...</p>