title: Don't match specific pattern in Regexp Javascript
body: <p>I have a mongodb query that may contain dynamic values for example</p>
  
  <pre><code>[{$group: { _id: '$os_name', count: { $sum: 1 } }},{$sort:{count:-1}},{$out:'newc'},{$group: { _id: '$os_name', count: { $sum: 1 } }}]
  [{$group: { _id: '$browser', count: { $sum: 1 } }},{$sort:{count:-1}},{$out:'deffC'}]
  </code></pre>
  
  <p>I want always match everything without <code>,{$out:'anything'}</code></p>
  
  <p>End result is </p>
  
  <pre><code>[{$group: { _id: '$os_name', count: { $sum: 1 } }},{$sort:{count:-1}},{$group: { _id: '$os_name', count: { $sum: 1 } }}]
  [{$group: { _id: '$browser', count: { $sum: 1 } }},{$sort:{count:-1}}]
  </code></pre>