title: extract terms from a capture group
body: <p>I am facing a difficulty which I am not able to solve, so I am asking here.</p>
  
  <p>I am parsing logs from a SIEM, where I would like to extract some terms.</p>
  
  <p>Logs format is strict but content varies from one line to the other.
  Where some logs will contain a sentence delimited by double quotes eg. "... ... ...", some other at the same place (thus captured in the same capturing group) will only contain - (ascii 45) </p>
  
  <p>I wrote the following regex (pcre) : 
  </p>
  
  <pre><code>\s(?P&lt;cap1&gt;\".+\"|\-)\s
  </code></pre>
  
  <p>But I want to capture the '-' symbol as well as the other characters between the double quotes in the sentences.</p>
  
  <p>Is there anyway of doing this ? Something like 
  </p>
  
  <pre><code>\s(\"?P&lt;cap1&gt;(.+)\"|?P&lt;cap1&gt;\-)\s 
  </code></pre>
  
  <p>(which I know isn't working)</p>
  
  <p>Thanks for your help!</p>