title: Dart how to match and then replace a regexp
body: <p>This may be a silly question, but I can't find any reference on how to replace a text after being matched by a regexp using Dart's <code>RegExp</code>.</p>
  <p>Basically what I'm trying to do is like this:
  I have a text like this</p>
  <pre><code>'{name : aName, hobby : [fishing, playing_guitar]}'
  </code></pre>
  <p>I want to match the string using this pattern <code>\b\w+\b</code>, then replace using <code>&quot;$&amp;&quot;</code>. I expect the output to be like:</p>
  <pre><code>'{&quot;name&quot; : &quot;aName&quot;, &quot;hobby&quot; : [&quot;fishing&quot;, &quot;playing_guitar&quot;]}'
  </code></pre>
  <p>So later I can use <code>dart:json</code>'s <code>parse</code> to turn that to a <code>Map</code>.</p>
  <p>Maybe I missed something. Does anyone know how I can achieve this replacement?</p>