title: How to use named regex groups in ack output?
body: <p>Suppose I have a foo.txt file with the following content:</p>
  
  <pre><code>[2010-11-13 12:00:02,656]
  [2010-11-13 12:00:02,701]
  [2010-11-13 12:00:02,902]
  </code></pre>
  
  <p>When I <code>ack</code> for the date portion with the following, it works:</p>
  
  <pre><code>ack "(?P&lt;foo&gt;\d{4}-\d{2}-\d{2})" foo.txt --output "\$1"
  
  2010-11-13
  2010-11-13
  2010-11-13
  </code></pre>
  
  <p>But when I try to use <code>--output</code> with the named group "foo", I cannot get it to work:</p>
  
  <pre><code>ack "(?P&lt;foo&gt;\d{4}-\d{2}-\d{2})" foo.txt --output "(?P=foo)"
  
  (?=foo)
  (?=foo)
  (?=foo)
  </code></pre>
  
  <p>Any help is greatly appreciate it. Thanks so much.</p>