title: Dart RegExp white spaces is not recognized
body: <p>I'm trying to implement a regex pattern for username that allows English letters, Arabic letters, digits, dash and space.</p>
  <p>The following pattern always returns no match if the input string has a space even though \s is included in the pattern</p>
  <pre><code>Pattern _usernamePattern = r'^[a-zA-Z0-9\u0621-\u064A\-\s]{3,30}$';
  </code></pre>
  <p>I also tried replacing \s with &quot; &quot; and \\s but the regex always returns no matches for any input that has a space in it.</p>
  <p>Edit: It turns out that flutter adds a unicode character for &quot;Right-To-Left Mark&quot; or &quot;Left-To-Right Mark&quot; when using a textfield with a mix of languages that go LTR or RTL. This additional mark is a unicode character that's gets added to the text. The regex above was failing because of this additional character. To resolve the issue simply do a replaceAll for these characters. Read more here: <a href="https://github.com/flutter/flutter/issues/56514" rel="nofollow noreferrer">https://github.com/flutter/flutter/issues/56514</a>.</p>