lykowar
lykowar

Reputation: 13

How to use Regex on String in XQuery

I'm trying to create a simple XML out of an rss which I get online. The only problem I got is that when I ask for the link, some of the rss have like "www.page.com/old-something/www.page.com/.." so crearly the link won't work unless I can cut the first "www.page.." from the link, so my code goes as follows: let $itemLink :=string-afger($items/link, 'www.wantedpage*') where $items is the node of the Item.

I keep getting the error "Unknown system function" for which I don't know if it's because I'm using the function incorrectly or not declaring the function namespace or it is something else.

Upvotes: 0

Views: 236

Answers (1)

wst
wst

Reputation: 11771

The name of the function you want is fn:substring-after.

Upvotes: 0

Related Questions