title: Dedicated Regular Expression for Persian alphabet
body: <p>How can I define a regular expression which solely accept Persian alphabet characters?</p>
  
  <p>I tried the following function, but it doesn't work properly:</p>
  
  <pre><code>function Just_persian(str){
    var p=/[پچجحخهعغفقثصضشسیبلاتنمکگوئدذرزطظژؤإأءًٌٍَُِّ\s]+$/;
    if(!str.match(p))
      alert("invalid format");
  }
  </code></pre>