xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

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 solution...

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.


--

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


Current Thread
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor