Darius
asked on
XSLT 1.0 - Finding Substrings from the End of a String
Hi Guys,
Please advice, how to use substring function and get result of ten last characters from the end?
input = 11234567899
Please advice, how to use substring function and get result of ten last characters from the end?
input = 11234567899
<xsl:variable name="lotNumber" select="LotNumber[string-length(normalize-space())>10]" />
<xsl:value-of select="substring(normalize-space($lotNumber),1,10)"/>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Small update, please see details below
There is no technically difference after removing '10'. Both ways is worked
There is no technically difference after removing '10'. Both ways is worked
<xsl:value-of select="substring(normalize-space($lotNumber),string-length(normalize-space($lotNumber))-9,10)"/>
<xsl:value-of select="substring(normalize-space($lotNumber),string-length(normalize-space($lotNumber))-9)"/>
ASKER
Thank you for assistance...
it has been tested and it works as expected.