Suppose we have a variable which contains a string like "a/b/c/d.txt;name=value" and we need to take the value before the searchstring(;) then that we can achieve following 2 ways:
1. Using substring-before():
substring-before($string,";")
2. Using substring() and index-within-string() functions;
substring($string,1,oraext:index-within-string($string,";")
This function(index-within-string()) returns the zero based index of the first occurance od search string within the input string. The function returns -1 if search string is not found.
No comments:
Post a Comment