title: searching a string from html page in php
body: <pre><code>&lt;?php
  $data = file_get_contents("http://localhost/traveller/index.html");
  $regex = '$_POST[/"search"/]';    
  
  if (isset($_POST["sub"])){
     if (preg_match($regex, $data)) {
      echo $regex;
  } else {
      echo "not found";
  }
  }
  ?&gt;
  
  &lt;form action="searching.php" method="POST"&gt;
      Search: &lt;br&gt;
      &lt;input type="text" name="search"&gt;
      &lt;input type="submit" name="sub"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>on running this program i get: </p>
  
  <blockquote>
    <p><strong>Warning</strong> preg_match(): No ending delimeter '$' found on line 6.  not
    found</p>
  </blockquote>
  
  <p>what should i do now?</p>