n class="co">#&gt; [1,]     1   1</span></span>
<span id="cb5-23"><a href="#cb5-23" tabindex="-1"></a><span class="co">#&gt; [2,]    NA  NA</span></span>
<span id="cb5-24"><a href="#cb5-24" tabindex="-1"></a><span class="co">#&gt; [3,]     2   2</span></span>
<span id="cb5-25"><a href="#cb5-25" tabindex="-1"></a><span class="fu">str_locate_all</span>(fruit3, <span class="at">pattern =</span> <span class="st">&quot;p&quot;</span>)</span>
<span id="cb5-26"><a href="#cb5-26" tabindex="-1"></a><span class="co">