Proper use of + in regex (R stringr)
<p>This seems like a basic question but I couldn't figure it out after spending a good part of the morning researching.</p>

<p>I want to understand <strong>why</strong> using <code>stringr::str_match()</code> in R</p>

<p><code>NP_[0-9][.0-9]+</code> <strong>or</strong> <code>NP_[0-9]+[.0-9]{2}</code></p>

<p><strong>and not</strong> <code>NP_[0-9]+[.0-9]</code> <strong>or</strong> <code>NP_[0-9]+[.0-9]{1}</code></p>

<p>matches <code>NP_848713.1</code> in</p>

<pre><code>string1&lt;-c("It_is_burried_in_here_NP_848713.1_somewhere")
</code></pre>

<p><strong>Thanks</strong></p>