title: Substitute the second occurrence of a date string
body: <p>The <em>second</em> occurrence of a date in round brackets, likie <code>(6.12.2016)</code>, should be replaced with empty round brackets <code>()</code></p>
  
  <p>I tried the following:</p>
  
  <pre><code>my $dateoccurence = 2;
  
  $content =~ s/(\(\d{2}\.\d{2}\.\d{4}\))/ --$dateoccurence == 0 ? "()" : $1 /ge;
  </code></pre>