title: Ruby gsub regex to add the first matched character back into the replaced string
body: <p>I have a small regex snippet in ruby below which is replacing ": [\w]" with ': ~'</p>
  
  <pre><code>&gt;&gt; "name: Name, phone_number: Phone Number, inactive: Inactive ".gsub(/[:]\s[\w]/, ': ~')
  
  =&gt; "name: ~ame, phone_number: ~hone Number, inactive: ~nactive "
  </code></pre>
  
  <p>How can I modify the gsub expression to add the first character back into the replaced string, i.e:</p>
  
  <blockquote>
    <p>=> "name: ~Name, phone_number: ~Phone Number, inactive: ~Inactive "</p>
  </blockquote>
  
  <p>Thanks</p>