ss="n">match</span>
        <span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">regex</span><span class="p">,</span> <span class="n">re</span><span class="o">.</span><span class="n">Pattern</span><span class="p">):</span>
            <span class="n">regex_func</span> <span class="o">=</span> <span class="n">regex</span><span class="o">.</span><span class="n">match</span>
        <span class="k">else</span><span class="p">:</span>
            <span class="n">