title: How do I remove the colon from this capturing group in PCRE, while still capturing correctly?
body: <p>Given this regex</p>
  
  <pre><code>^(?P&lt;book&gt;[\d]?\s?[\D]+)(?P&lt;chapter&gt;\s[\d]*)?(?P&lt;verse&gt;[:|\s]+[\d]*)?$
  </code></pre>
  
  <p>How do I stop the colon from being captured without messing up the "Chapter" group? If I put the colon to the left of the "Verse" group, "1 John 3" registers as </p>
  
  <pre><code>[
    "book" =&gt; "1 John",
    "chapter" =&gt; "",
    "verse" =&gt; "3"
  ]
  </code></pre>
  
  <p>But "1 John 3:2" captures as</p>
  
  <pre><code>[
    "book" =&gt; "1 John",
    "chapter" =&gt; "3",
    "verse" =&gt; ":2"
  ]
  </code></pre>
  
  <p><a href="http://regexr.com/398g2" rel="nofollow">Tool to Test in Realtime</a></p>
  
  <p>I'd like the capture to exclude the colon, because it shouldn't be the application's job to "fix" a botched regex.</p>
  
  <h2>Desired Result</h2>
  
  <pre><code>[
    "book" =&gt; "1 John",
    "chapter" =&gt; "3",
    "verse" =&gt; "2"
  ]
  </code></pre>
  
  <h2>Edit</h2>
  
  <p>Sorry, didn't realize that the link above doesn't save the text I was using. Here's a couple strings I was testing against:</p>
  
  <pre><code>1 John 3:12
  Matthew 3
  2 Peter 4:1
  St John
  </code></pre>