title: RegExp for numbers 024648-4568 in dart
body: <p>I am using Flutter and dart and I want RegExp to validate strings in the <code>024648-4568</code> like format, where a user can only put six numbers at the start, then a <code>-</code> and then 4 digits at the end.</p>
  <p>I started with <code>RegExp(r'^\d{1,6}[\-]?\d{4}')</code>, but could not fix it for the subsequent dash and 4 digits.</p>
  <p>In Flutter, I use it like this:</p>
  <pre class="lang-dart prettyprint-override"><code>inputFormatters: [new FilteringTextInputFormatter.allow( RegExp(r'^\d{1,6}-\d{4}') ,]
  </code></pre>