.. _functx_substring-after-last: =========================== functx:substring-after-last =========================== The substring after the last occurrence of a delimiter Description ~~~~~~~~~~~ The functx:substring-after-last function returns the part of $arg that appears after the last occurrence of $delim. If $arg does not contain $delim, the entire $arg is returned. If $arg is the empty sequence, a zero-length string is returned. .. list-table:: :widths: 40 60 :header-rows: 1 * - **Parameters** - **Description** * - arg:string() - the string to substring * - delim:string() - the delimiter Examples ~~~~~~~~ .. list-table:: :widths: 50 50 :header-rows: 1 * - **XPath** - **Results** * - functx:substring-after-last('abc-def-ghi', '-') - ghi * - functx:substring-after-last('abcd-abcd', 'ab') - cd * - functx:substring-after-last('abcd-abcd', 'x') - abcd-abcd Depends On ~~~~~~~~~~ * :ref:`functx_escape-for-regex`. See Also ~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`substring-after`. * :ref:`functx_substring-before-last`. * :ref:`functx_substring-after-last-match`.