title: How to Detect Arabic or Persian character in string by c#?
body: <p>I want to detect <strong>Arabic</strong> or <strong>Persian</strong> character in a string.</p>
  
  <p>For example:</p>
  
  <p>search in string = <code>"مشخصات، قیمت و خرید لپ تاپ 15 اینچی ایسر مدل Aspire ES1-533-C4UH"</code></p>
  
  <p>and return <code>true</code> </p>
  
  <p>and search in string=<code>"Aspire ES1-533-C4UH"</code></p>
  
  <p>and return <code>false</code></p>
  
  <pre><code>string pattern = @"^[\p{IsArabic}\s\p{N}]+$";
  string input = @"مشخصات، قیمت و خرید لپ تاپ 15 اینچی ایسر مدل Aspire ES1-533-C4UH";
  RegexOptions options = RegexOptions.RightToLeft;"
  
  foreach (Match m in Regex.Matches(input, pattern, options))
  {
      if(m.Value !="")
      {
          bool x=true;
      }
      else
          x=false;
  }
  </code></pre>
  
  <p>but this doesn not work.</p>