I'm retrieving like this

 <xsl:call-template name="RemoveHtml">
           <xsl:with-param name="String" select="@Person.title"/>

Result looks like this Neill@uxxx.com33Field@uxxx.com

How can i remove the number "33" and replace with space or comma.

Thanks in advance


You need to specify XSLT 1.0 or 2.0: 2.0 makes this kind of thing much easier with the replace() function, which uses regular expressions.

If you're stuck with XSLT 1.0, then try:

normalize-space(translate(xxx, '0123456789', '          '))

which replaces all digits with spaces and then collapses multiple spaces to a single space.

  • Thanks Michael. it did the trick but i had to stick with 1.0 :( – naijacoder Jun 28 '18 at 5:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.