Thursday, August 17, 2023

XSLT - How to get last 4 characters only from a substring with variable length of characters each time

We can use the string-length() in conjunction with substring to get the last 4 characters


<xsl:value-of select="substring(cbc:Note, string-length(cbc:Note) - 3)" />


Example:

Input: Note: abcdefg1234

Output: 1234

No comments:

Post a Comment

Featured Post

OIC CCS Utility Adapter – Misleading “Client ID Wrong” Error (Actual Issue: Catalog Not Configured)

๐Ÿ“Œ Overview While configuring a CCS (Customer Cloud Service) / Utilities Adapter connection in Oracle Integration Cloud (OIC) using Client C...