[XSL-LIST Mailing List Archive Home]
Re: [xsl] Trying to replace vertical pipe...
Subject: Re: [xsl] Trying to replace vertical pipe...|
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Thu, 26 Aug 2010 18:33:53 +0200
Paul Harvey wrote:
I'm sure I can't be the first to face this, but have been unable to track down a
I'm trying to replace the string "|95|" with a single character but the
"replace()" function seems to interpret the vertical bars as "or" and won't
allow it, complaining about a "zero-length string".
How would I escape |95| in order for it to be treated it as a string and enable
it to be replaced?
In general you can use a function like
http://www.xsltfunctions.com/xsl/functx_escape-for-regex.html to escape
any characters that usually carry a meaning for the regular expression.