title: Can I confirm if the string is matching with the first block at my regex
body: <p>I've the below code:</p>
  <pre class="lang-golang prettyprint-override"><code>package main
  
  import (
      &quot;fmt&quot;
      &quot;regexp&quot;
  )
  
  func main() {
      str := &quot;This is a delimited string, so let's go&quot;
      re := regexp.MustCompile(`(?i)(This is a delimited string)|delimited|string`)
      matches := re.FindAllString(str, -1)
      fmt.Println(&quot;We found&quot;, len(matches), &quot;matches, that are:&quot;, matches)
  }
  </code></pre>
  <p>And getting the output as:</p>
  <pre class="lang-bash prettyprint-override"><code>We found 1 matches, that are: [This is a delimited string]
  </code></pre>
  <p>If I changed the <code>str</code> in the above code to be:</p>
  <pre class="lang-golang prettyprint-override"><code>str := &quot;This is not a delimited string, so let's go&quot;
  </code></pre>
  <p>Then I'm getting the output as:</p>
  <pre class="lang-bash prettyprint-override"><code>We found 2 matches, that are: [delimited string]
  </code></pre>
  <p>Both are correct, but in the first block <code>str</code> which is having <code>1 match</code> is matching <code>100%</code> with the first block at my regex, which is <code>This is a delimited string</code>, while <code>str</code> in the second block showing 2 matches, none of them is matching with my first block at my regex.</p>
  <p>Is there a way, so I know if the <code>str</code> is matching with the first block at my regex or no, so that I get complete match<code>or</code>partial match<code>is the</code>len(matches)` is not zero, but the first block at the regex is not matched!</p>