title: Deprecated functions is deprecated ereg_replace() and eregi()
body: <p>following two lines are giving warning,</p>
  
  <pre><code>if (eregi($patt,$v,$res))
  Deprecated: Function eregi() is deprecated in /classes/xtpl.php on line 50
  </code></pre>
  
  <p>and </p>
  
  <pre><code>$copy=ereg_replace("\{".$v."\}","$var",$copy);
  
  Deprecated: Function ereg_replace() is deprecated in /classes/xtpl.php on line 25
  </code></pre>
  
  <p>i have try to use <code>preg_match()</code> in following way, but unable to solve the issue</p>
  
  <pre><code>$copy=preg_match("\{".$v."\}","$var",$copy);
  if (preg_match($patt,$v,$res))
  </code></pre>
  
  <p>please give some idea</p>