title: Java and Android regex difference
body: <p>Good day! 
  I have a regex pattern :</p>
  
  <pre><code> Pattern p = Pattern.compile("^[a-zA-Z_\\$][\\w\\$]*(?:\\.[a-zA-Z_\\$][\\w\\$]*)*$");
  </code></pre>
  
  <p>It should tell me if java / android package name is legal or not.
  It works fine on desktop java, but it failures on android devices</p>
  
  <p>Lets say I have some package names :</p>
  
  <pre><code> ". .", "ПАвыапЫВАПыва", "com.mxtech.ffmpeg.v7_neon", ...
  </code></pre>
  
  <p>Test should show that the only valid package is "com.mxtech.ffmpeg.v7_neon", but is also shows that test string  </p>
  
  <pre><code>" _ПАвыапЫВАПыва\_ "
  </code></pre>
  
  <p>is valid. Why? (It is Cyrillic. ) </p>
  
  <p>What is the difference between Android and Desktop realizations?</p>