Re: [xsl] Quoting meta characters for a regular expression character class

Subject: Re: [xsl] Quoting meta characters for a regular expression character class
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Tue, 26 Aug 2008 07:18:09 -0700
On Tue, Aug 26, 2008 at 5:33 AM, Florent Georges <lists@xxxxxxxxxxxx> wrote:
> Dimitre Novatchev wrote:
>
>  Hi Dimitre,
>
>> > Try whether
>> > http://www.xsltfunctions.com/xsl/functx_escape-for-regex.html
>> > does what you want.
>
>> Or simply use a more generally applicable function -- the
>> f:str-dropWhile() function of FXSL like this:
>
>  At first glance, it seems that your example cuts the largest
> substring at the end of the string, that is exclusively compound by
> some characters in a list.

Yes. This is exactly the task that the OP wants to carry out. To quote:

"Basically the template accepts a string and a list of characters to
remove from the end of the string"


> How is this related to escaping a string
> regarding regexes?  It seems I missed something.

The relation is obvious: with this solution one does not need to
evaluate a RegEx at all.



-- 
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play

Current Thread