title: Get part of a string using a RegEx in Dart
body: <p>I have this sentence <code>commerce_product--default</code> which I want to extract only the last part so here <code>default</code>, to do so I'm using this RegEx <code>RegExp(r'-\s*\K[^-]+$')</code><br></p>
  <p>Now I try to display it in my code but I didn't find the method to do it, I've tried with stringMatch or replaceAll like this :</p>
  <pre class="lang-dart prettyprint-override"><code>final type = 'commerce_product--default';
  final newType = type.replaceAll(RegExp(r'-\s*\K[^-]+$'), type);
  </code></pre>
  <p>but it didn't work.<br>
  Thanks for the help</p>