<main><divclass="width-limiter"><navclass="sub"><formclass="search-form"><span></span><divid="sidebar-button"tabindex="-1"><ahref="../../../regex_automata/all.html"title="show sidebar"></a></div><inputclass="search-input"name="search"aria-label="Run search in the documentation"autocomplete="off"spellcheck="false"placeholder="Click or press ‘S’ to search, ‘?’ for more options…"type="search"><divid="help-button"tabindex="-1"><ahref="../../../help.html"title="help">?</a></div><divid="settings-menu"tabindex="-1"><ahref="../../../settings.html"title="settings"><imgwidth="22"height="22"alt="Change settings"src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><sectionid="main-content"class="content"><divclass="main-heading"><h1>Module <ahref="../../index.html">regex_automata</a>::<wbr><ahref="../index.html">util</a>::<wbr><aclass="mod"href="#">interpolate</a><buttonid="copy-path"title="Copy item path to clipboard"><imgsrc="../../../static.files/clipboard-7571035ce49a181d.svg"width="19"height="18"alt="Copy item path"></button></h1><spanclass="out-of-band"><aclass="src"href="../../../src/regex_automata/util/interpolate.rs.html#1-579">source</a> · <buttonid="toggle-all-docs"title="collapse all docs">[<span>−</span>]</button></span></div><detailsclass="toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>Provides routines for interpolating capture group references.</p>
<p>That is, if a replacement string contains references like <code>$foo</code> or <code>${foo1}</code>,
then they are replaced with the corresponding capture values for the groups
named <code>foo</code> and <code>foo1</code>, respectively. Similarly, syntax like <code>$1</code> and <code>${1}</code>
is supported as well, with <code>1</code> corresponding to a capture group index and not
a name.</p>
<p>This module provides the free functions <ahref="fn.string.html"title="fn regex_automata::util::interpolate::string"><code>string</code></a> and <ahref="fn.bytes.html"title="fn regex_automata::util::interpolate::bytes"><code>bytes</code></a>, which
interpolate Rust Unicode strings and byte strings, respectively.</p>
</div></details><h2id="functions"class="section-header">Functions<ahref="#functions"class="anchor">§</a></h2><ulclass="item-table"><li><divclass="item-name"><aclass="fn"href="fn.bytes.html"title="fn regex_automata::util::interpolate::bytes">bytes</a></div><divclass="desc docblock-short">Accepts a replacement byte string and interpolates capture references with
their corresponding values.</div></li><li><divclass="item-name"><aclass="fn"href="fn.string.html"title="fn regex_automata::util::interpolate::string">string</a></div><divclass="desc docblock-short">Accepts a replacement string and interpolates capture references with their