fn:substring-after

Return substring of a string value following another string.

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:


Syntax

fn:substring-after(string $string, string? $searchString) => string?
fn:substring-after(string $string, string? $searchString, string $collation) => string?

Description

This function returns that part of $string, which follows the string value searchString.

If the value of $string or $searchString is the empty sequence, the function returns the empty sequence. If the value of $searchString is the empty string, then the function returns the value of $string. If the value of $string does not contain a string that is equal to the value of $searchString, then the function returns the empty string

Argument

$string

string value

$searchString

string value that is searched in $string

$collation

optional valid collation string literal

Example

This query returns the string value " Server":

substring-after("Tamino XML Server", "XML")