title: Using regex in php to just select and echo out persian chars
body: <p>I have a string like this :</p>
  
  <pre><code>این یafsک رشsegته می y34باشد
  </code></pre>
  
  <p>Specially , i want a function (like <strong>regex</strong>) to echo out JUST persian chars.</p>
  
  <p>So , the out put should be : </p>
  
  <pre><code>این یک رشته می باشد
  </code></pre>
  
  <p>I have found we can use below regex, but i can't use it with function, it does not work.</p>
  
  <p><strong>regex i tried:</strong></p>
  
  <pre><code>preg_match("(^[\x{0600}-\x{06FF}]*$)", $title);
  </code></pre>
  
  <p><strong>error : Compilation failed: character value in \x{} or \o{} is too large at offset</strong> </p>
  
  <p>What can i do and what should i do ?</p>
  
  <p>Tnx.</p>