cter(0)</span></span></code></pre></div>
</div>
<div id="str_extract-extract-matching-patterns-from-a-string" class="section level2">
<h2><code>str_extract()</code>: Extract matching patterns from a
string</h2>
<p>We may want to pick out certain patterns from a string, for example,
the digits in a shopping list:</p>
<div class="sourceCode" id="cb14"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb14-1"><a href="#cb14-1" tabindex="-1"></a>shopping_list <span class="ot">&lt;-</span> <span cla