The substring-after function returns a string that is the rest of a given string after a given substring.
The substring-after function returns a string that is the rest of a given string after a given substring.
substring-after( haystack, needle )
haystackThe string to be evaluated. Part of this string will be returned.
needleThe substring to search for. Everything after the first occurrence of needle in haystack will be returned.
A string.
| XPath Example | Output |
|---|---|
substring-after('aa-bb','-') | bb |
substring-after('aa-bb','a') | a-bb |
substring-after('aa-bb','b') | b |
substring-after('aa-bb','q') | (empty string) |
Supported.
© 2005–2022 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/XPath/Functions/substring-after