Link to home
Start Free TrialLog in
Avatar of Darius
DariusFlag for Lithuania

asked on

xslt 1.0 - Formatting string (Removing characters 'BX' from string)

Hi guys,

Can you please assist with function below.

I need to handle two scenarios.
To remove characters 'BX' and replace with two preceding zero’s if zero after 'BX' exist.
example:
BX0000000005100368  - mapped to - 000000000005100368

And if zeroes not exist, remove 'BX' only.
example:
BXG1563300110901 - mapped to - G1563300110901

<xsl:value-of select="concat('00', substring-after($string, 'BX'))"/>

Open in new window




thank you,
Darius
ASKER CERTIFIED SOLUTION
Avatar of zc2
zc2
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Darius

ASKER

100%

Thank you zs2!
You are welcome