title: Android Studio Kotlin regex different than expected
body: <p>I'm having a problem with a specific regex that is returning a different value than expected when running in Android Studio.</p>
  
  <p><strong>Scenario:</strong></p>
  
  <p>The code is simple:</p>
  
  <pre><code>val regex = "(?&lt;=N|E|\\G)\\d{2}(?=\\d*$)".toRegex()
  print("${regex.findAll("N2032354345").count()}")
  </code></pre>
  
  <p>This should print 5 as there are 5 matches in this string (<a href="https://regex101.com/r/6PDbkI/1" rel="noreferrer">https://regex101.com/r/6PDbkI/1</a>) and if we run in on <a href="https://ideone.com/1YCCnK" rel="noreferrer">Ideone.com</a> or in <a href="https://pl.kotl.in/r1QlMyXaX" rel="noreferrer">Kotlin Playground</a>, the result is the expected 5.</p>
  
  <p>However, in Android Studio, the result is 1:
  <a href="https://i.stack.imgur.com/YMvuk.png" rel="noreferrer"><img src="https://i.stack.imgur.com/YMvuk.png" alt=""></a></p>
  
  <p><strong>Theory:</strong></p>
  
  <p>It seems that the regex in Android Studio is failing to use the <code>\G</code> operator (which might be related to <a href="https://stackoverflow.com/q/52072404/3410697">Kotlin split with regex work not as expected</a>)</p>
  
  <p>Anyone faced the same problem? Is there any way to change the regex to a similar one that isn't failing in Android Studio? Am I missing some setting?</p>