|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Trying to replace vertical pipe...
On 8/26/2010 11:53 AM, Paul Harvey wrote:
> Hmm, get "invalid escape character" when doing that...
Can you show us your code?
The following is an example of what David was talking about.
<xsl:value-of select="replace('a|95|a', '\|95\|', 'x')"/>
I tested it and it works, no errors.
This is not a matter of escaping for strings (note the first argument to
replace() doesn't need it), but of escaping for regexps.
Pipe is a special character for regexps, not for string literals.
Lars
>
> ----- Original Message ----
> From: David Carlisle <davidc@xxxxxxxxx>
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Cc: Paul Harvey <paul_harv_2@xxxxxxxxx>
> Sent: Thu, August 26, 2010 12:35:35 PM
> Subject: Re: Trying to replace vertical pipe...
>
> On 26/08/2010 17:26, Paul Harvey wrote:
>> I'm sure I can't be the first to face this, but have been unable to track down
>> a
>> solution...
>>
> use \| to quote |
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








