title: result in group between two non capture groups
body: <p>Im' trying to catch  pattern between two non capture groups in main group.<br />
  How can i make it ?</p>
  <p>here it is part of my regex :
  (?P(?:Alias\s+?name.).*?(?:\n))</p>
  <p>part  of my text :
  Alias name: Company root ca\n</p>
  <p>correct output :
  Company root ca</p>
  <p>So who can explain me why it not working?</p>
  <p>p.s essential condition for me  it use re.compile with re.S . Little bit  code to show :</p>
  <pre><code>regex = re.compile(r'(?P&lt;alias&gt;(?:Alias name).*?)(?:\n).*?'
                     r'(?P&lt;entry&gt;(?:Entry type).*?)(?:\n).*?'
                     r'(?P&lt;Owner&gt;(?:Owner).*?)(?:\n).*?'
                     r'(?P&lt;Valid&gt;(?:Valid from).*?[A-Z]{3}\s+?\d+).*?'
                     r'(?P&lt;untin&gt;(?:until).*?[A-Z]{3}\s+?\d+)', re.S)
  for k in regex.finditer(text):
      f = k.groupdict()
      f['TimeStamp'] = datetime.datetime.now().strftime('%d.%m.%Y %H:%M')
      f[jksfile] = jksfile
      print(f)  # eventually it will be dictionary
  
  </code></pre>
  <p>full regex example : <a href="https://regex101.com/r/IGjPaE/2" rel="nofollow noreferrer">https://regex101.com/r/IGjPaE/2</a></p>
  <p>Guys, any help.....</p>