title: Groovy/Grails: Get key:value pairs satisfying a regexp
body: <p>I have a map and would like to get all key:value pairs where the key matches a regular expression. I have a solution where I grep for the keySet() first them loop through and find. But there must a simpler solution (or I'm hoping).</p>
  
  <p>Ex: </p>
  
  <pre><code>def qmap = [name: "hair", style: 'straight', color_1: 'brown', color_2: 'blonde', color_3: 'black']
  </code></pre>
  
  <p>I would like to get a submap with just the colors.</p>
  
  <pre><code>def colors = [color_1: 'brown', color_2: 'blonde', color_3: 'black']
  </code></pre>
  
  <p>I can get the keys by using .grep, but this just gives me the keys and I need to loop through to get the values. </p>
  
  <pre><code>def colorKeys = qmap.keySet().grep(~/^color.*/)
  </code></pre>
  
  <p>Any ideas how to do this?</p>