[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Escaping Characters in replace()

Subject: Re: Escaping Characters in replace()
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 15 Oct 2013 18:26:56 +0100
Re:  Escaping Characters in replace()
On 15/10/2013 17:44, Nathan Tallman wrote:
Thank you, David. Unfortunately, I still get ". after processing...

Presumably the template never matched.


(I'm transforming XML to HML, btw.)

Also, a question. Why didn't you need to escape the period in the
third argument of replace()?

You need \. to mean a literal . in a regular expression, not in the replacement text.


> (When I inert one, my processor throws an
error; so, I understand it's wrong, but not why. Also, I seem to be
able to delete the backslash in front of the period in the second
argument without causing problems... Why is that?)

". is a legal regex but matches a " followed by any character


replace(.,'"."','."')

would change "x to ."


David


google plus: https:/profiles.google.com/d.p.carlisle

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.