title: invert regex pattern in python
body: <p>I'm trying to filter from string only the Arabic character but the next function doesn't work for me:</p>
  
  <pre class="lang-py prettyprint-override"><code>import re
  
  def remove_any_non_arabic_char(text):
      non_arabic_char = re.compile('^[\u0627-\u064a]')
      text = re.sub(non_arabic_char, "", text)
      print(text)
  
  </code></pre>
  
  <p>for example: </p>
  
  <pre><code>s = "Kühn xvii, 346] قال جالينوس: [1] قد اتفق جل من فسر هذا الكتا"
  </code></pre>
  
  <p>The desired output of <code>remove_any_non_arabic_char(s)</code> should be <code>قال جالينوس قد اتفق جل من فسر هذا الكتا</code> but the input stays without changes.</p>
  
  <p>What should I do?</p>