Subject:Regex replace Author:Manikandan Surendranath Date:18 May 2005 01:10 PM
Hi,
Recently I learnt that there is no processor independant replace() function avaliable in xslt, though the specification says so. Therefore I think regex will not be available too. Here is a solution I am looking for, I want to search a number followed by one or more whitespace and then a unit of measurement, like '9 mm' and output it to be '9 mm'. Can somebody guide me to do this?
Subject:Regex replace Author:(Deleted User) Date:19 May 2005 04:16 PM
Hi,
the reason why there is no processor independent replace() function is because the XSLT 1.0 specs do not specify such a function. Maybe you are referring to the EXSLT extension library (http://www.exslt.org), but that's a "community initiative", not a standard.
If you are looking for a processor independent way of doing a regex-based replace you should consider moving to XSLT 2.0, that has the fn:replace() function.