xsl-list
[Top] [All Lists]

Re: [xsl] Replace function

2010-10-22 07:11:54
Meeraj Kunnumpurath wrote:
Hi,

Is there a function in XSLT to replace characters from a string that
are not present in a set of characters?

For example if the string is "ABCD", the valid character set is [A, B,
C] and the replacement charcater is '-', the function will return
'ABC-'.

XSLT/XPath 2.0:
  replace("ABCD", "[^ABC]", "-")


--

        Martin Honnen
        http://msmvps.com/blogs/martin_honnen/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>