title: preg_match and long strings
body: <p>This is the preg_match i am trying to use to find specific text in text file.</p>
  
  <pre><code>if (preg_match($regexp,$textFile,$result) &gt; 0) {
      echo "Found ".$result[0];
  } else {
      echo "Not found";
  }
  </code></pre>
  
  <p>However, the result is always <code>Found</code> and nothing more. The result array is empty. Now i read that preg_match can't work with long strings.</p>
  
  <p>My text file is about 300KB so thats 300000 characters i guess.</p>
  
  <p>I am 100% sure that the searched string is in the text file, and the fact that preg_match function returns value above 0 means it found it, but it didn't place it into the result array somehow.</p>
  
  <p>So my question would be, how do i make it work?</p>
  
  <p>regexp would be <code>/[specific text]\{(\d*)\}/</code> so, of course i want to be able to get the number in the parentheses.</p>