e R requires the combination of <code>regexpr()</code> with
<code>regmatches()</code>; but note that the strings without matches are
dropped from the output. stringr provides <code>str_extract()</code> and
<code>str_extract_all()</code>, and the output is always the same length
as the input.</p>
</div>
<div id="str_match-extract-matched-groups-from-a-string" class="section level2">
<h2><code>str_match()</code>: Extract matched groups from a string</h2>
<p>We may also want to extract groups from a string. He