1

i have one variable $serviceName = "ZSMeter". i have to remove "S" from this string and get "ZMeter". how i can solve it. thanks in advance.

4 Answers 4

2
translate($serviceName, 'S', '')
Sign up to request clarification or add additional context in comments.

Comments

1
concat(
    substring($serviceName, 1, 1),
    substring($serviceName, 3)
    )

Comments

0

pardon my xsl... but hope it ll help

<xsl:variable name="frst" select="substring-before($serviceName,'S')" /> <xsl:variable name="after" select="substring-after($serviceName,'S')" /> <xsl:variable name=serviceName select="concat($frst,$after)" />

Comments

0

replace($serviceName, '^ZSMeter$', 'ZMeter') in case you're with XSLT 2.0.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.