fn:tokenize
Returns a sequence of strings formed by breaking the input string at any substring that matches the given regular expression.
tokenize($input as xs:string?) ➔ xs:string*
Arguments | |||
| $input | xs:string? | The input string to be tokenized |
Result | xs:string* |
tokenize($input as xs:string?, $pattern as xs:string) ➔ xs:string*
Arguments | |||
| $input | xs:string? | The input string to be tokenized |
| $pattern | xs:string | Regular expression matching the separators between tokens |
Result | xs:string* |
tokenize($input as xs:string?, $pattern as xs:string, $flags as xs:string) ➔ xs:string*
Arguments | |||
| $input | xs:string? | The input string to be tokenized |
| $pattern | xs:string | Regular expression matching the separators between tokens |
| $flags | xs:string | Flags controlling how the regular expression is interpreted |
Result | xs:string* |
Namespace
http://www.w3.org/2005/xpath-functions
Links to W3C specifications
XPath 2.0 Functions and Operators
XPath 3.0 Functions and Operators
XPath 3.1 Functions and Operators
Notes on the Saxon implementation
Saxon 9.3 introduces support for the q
flag, and for XPath 3.0 regular
expression enhancements, provided XPath 3.0 is enabled.
Saxon supports extended syntax for the flags argument: see the matches() function for details.
The single-argument form of this function specified in XPath 3.1, which is equivalent to supplying the second argument as a single space character (x20), is available since Saxon 9.7.