.. _functx_number-of-matches: ======================== functx:number-of-matches ======================== O número de trechos que casam com um padrão Descrição ~~~~~~~~~ A função functx:number-of-matches conta quantas vezes uma string casa com um padrão (expressão regular). Trechos sobrepostos não são contados. .. list-table:: :widths: 40 60 :header-rows: 1 * - **Parâmetros** - **Descrição** * - arg:string() - a string a testar * - pattern:string() - a expressão regular Exemplos ~~~~~~~~ .. list-table:: :widths: 50 50 :header-rows: 1 * - **XPath** - **Resultado** * - functx:number-of-matches('abcabc','ab') - 2 * - functx:number-of-matches('12345','\\d') - 5 * - functx:number-of-matches('aaaaaa','aaa') - 2 Veja também ~~~~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`matches`.